Kevin Day [Fri, 24 Feb 2023 02:14:39 +0000 (20:14 -0600)]
Cleanup: Consistently apply verbosity to error message with fallback.
The fallback error message is an automatically recovered error.
Only print the error message in verbose mode or greater.
This behavior is followed elsewhere and so this change makes the design more consistent.
Kevin Day [Wed, 22 Feb 2023 23:57:58 +0000 (17:57 -0600)]
Bugfix: Control group function is partially outdated and uses incorrect integer.
The F_control_group_path_system_default_s_length should not be used here when progressing the path string.
Use control_group.groups.array[i].used instead.
Kevin Day [Wed, 22 Feb 2023 04:45:09 +0000 (22:45 -0600)]
Bugfix: Incorrect and messy file error messages.
The code is unlikely to get to the error cases that print these messages due to other safety checks.
This makes testing this more difficult.
I do not currently have the testing environment for this.
I found the error messages is messed up and incorrect.
Clean up the messages.
This has not been tested due to the above mentioned problems.
Kevin Day [Wed, 15 Feb 2023 05:05:12 +0000 (23:05 -0600)]
Security: Invalid read or write while expanding operations.
The logic here is non-standard.
The normal logic operates on a pre-allocated basis.
That is, right before accessing the data perform the pre-allocation.
This code operates on the expectation that new variables are only added when conditionally required.
This results in a post-allocation basis where once a variable is known to expand then increment the used variable for the next pass.
The allocation checks need to happen after the increment on used.
There are some cases where this post-allocation is not happening.
This is probably a regression in the very recent bug fixes regarding expanding operations.
Be sure to ensure a clean state after the post-allocation process.
Kevin Day [Wed, 15 Feb 2023 04:15:23 +0000 (22:15 -0600)]
Bugfix: Multiple single-valued Objects should used last instead of first Object.
Early on I was uncertain on what the proper behavior should be.
Over time I established that the last Object specified should be used.
This makes sense with most things.
Consider normal math:
x = 1
x = 2
Is x equal to 1 or 2?
I strongly believe the most common interpretation would be "2" because the assignment to "2" comes after the assignment to "1" when reading top-down.
Following this logic, the single-valued settings Objects must use the last occurrence rather than the first.
Kevin Day [Sun, 12 Feb 2023 16:22:20 +0000 (10:22 -0600)]
Feature: Add Turtle Kevux path support.
This does not break API or ABI because it requires macros to be defined that would break it.
These macros, when in use, should not break API (but does extend it) but may break ABI.
The return value may have additional results and might be considered an API but not ABI breaking change.
There is already Kevux-specific code in FLL.
Temporarily continue that process as a short term solution.
In the long term, separate functions or files may be used (or an entirely separate project).
Kevin Day [Mon, 6 Feb 2023 02:51:04 +0000 (20:51 -0600)]
Bugfix: Invalid defines, incorrect comments, missing flags, and missing dependencies.
There is an inconsistency where _di_f_color_string_s_ and _di_f_color_strings_s_ are used.
Settle on _di_f_color_string_s_ because it is defined in the header file.
Incorrect defines, such as _di_f_utf_is_contro_codel_ are removed.
The *.config.h comment example doesn't work.
Consistently add fanalyzer mode and make sure it is available in both settings and fakefile files.
Some of the define macros are missing in regards to private functions.
The controller program is missing f_limit and fl_directory dependencies.
Kevin Day [Tue, 31 Jan 2023 03:09:32 +0000 (21:09 -0600)]
Update: Controller and Control man page documentation.
Move the specification details into man (5) pages.
This further allows for more explicit declaration of the license of the specifications.
The following are the commands used to help generated these man pages:
fss_basic_list_read entry.txt +Q -cn "Entry Specification" | iki_read +Q -w -W code '\fB' '\fR'
Kevin Day [Tue, 31 Jan 2023 02:31:32 +0000 (20:31 -0600)]
Update: Featureless Make man page documentation.
Move the specification details into man (5) pages.
This further allows for more explicit declaration of the license of the specifications.
The following are the commands used to help generated these man pages.
fss_basic_list_read dependencies.txt +Q -cn "Dependencies Specification" | iki_read +Q -w -WWW code '\fB' '\fR' bold '\fB' '\fR' FLL '\fB' '\fR'
Kevin Day [Sun, 29 Jan 2023 23:27:21 +0000 (17:27 -0600)]
Bugfix: The build settings 'path_sources' is incorrectly added.
The commit 79858cf386916fd25ccd3578797de53b16f5c446 fixed a problem with the sources path passed to the program.
This revealed a bug where the build setting 'path_sources' is being added twice.
This is probably why the previous bug was not noticed for so long.
Make sure to apply the passed path sources parameter when the build settings does not have 'path_sources'.
Kevin Day [Sun, 29 Jan 2023 21:44:53 +0000 (15:44 -0600)]
Bugfix: The -S/--sources parameter is not being correctly used.
The parameter is not being properly validated.
The parameter is then not being appended to the appropriate strings.
The default value is being appended to the appropriate strings.
Kevin Day [Thu, 26 Jan 2023 04:27:01 +0000 (22:27 -0600)]
Regression: Serial example rule is not working.
Investigation revealed that the commit 002bf17595459e65173be16f983977ead99593b6 introduced a regression where the cached data is being reset incorrectly.
The data is properly processed but when there is more than a single rule the previous rules are being cleared.
Kevin Day [Thu, 26 Jan 2023 01:23:53 +0000 (19:23 -0600)]
Update: Add additional sanity checks.
The GCC -fanalyzer is reporting a problem that as far as I can tell is a false positive.
This program is older code practices and will eventually be rewritten anyway.
Kevin Day [Thu, 26 Jan 2023 00:56:36 +0000 (18:56 -0600)]
Security: NULL pointer dereference in writer due to pipe function result handling.
The GCC -fanalyzer parameter helped me discover this one.
The status_pipe is being read and processed.
There is a case where the status_pipe is being set but it is not being reset after handling.
In a later loop the pipe does not get read but the previously set state is used bringing the code into a bad state.
Then the loop doesn't do the block buffer used check and this results in the eventual NULL dereference.
Kevin Day [Thu, 26 Jan 2023 00:55:02 +0000 (18:55 -0600)]
Update: Add fanalyzer build mode.
I keep forgetting to run the GCC fanalyzer sanity checks to help catch problems before making a release.
Add a formal mode in all of the build settings to make this processor easier and therefore easier to remember.
Add missing -Wall to some of the files for the test mode.
Kevin Day [Tue, 24 Jan 2023 05:32:01 +0000 (23:32 -0600)]
Bugfix: Fakefile processing with color context is producing extra spaces when unquoted.
Do not generate a new argument when calling fake_make_operate_expand_context().
The color context should combine with existing arguments.
This does not handle the last context argument and more work is likely needed to handle that one.
Remove the not quoted check that always generates a new argument.
The FSS Extended should support one or more Content per Object.
All others support the same number of Objects as Content (not referring to nested Content).
The error and error message when this is and is not correctly being handled.
The correct detection needs to count based on sub locations rather than locations.
Kevin Day [Sat, 14 Jan 2023 23:34:35 +0000 (17:34 -0600)]
Update: The stand alone programs configuration.
Refresh the disable define configuration.
Fix problems in the settings files.
The stand alone fake program now has threading enabled (It was previously broken).
Kevin Day [Sat, 14 Jan 2023 23:08:32 +0000 (17:08 -0600)]
Bugfix: Several problems with the wrapping define macros, unused private functions, non-existent functions, and fix dependency.
The stand alone builds revealed several problems with the wrapping define macros.
The ones that I noticed or were blocking me from compiling have been fixed.
It will be no surprise if there are still more such problems hiding in the code somewhere.
Remove stale and unused private functions.
There is are no f_file_clone_at() and f_file_copy_at() functions.
Remove references and related wrapping define macros.
The firewall incorrectly has f_account as a dependency.
Kevin Day [Fri, 13 Jan 2023 23:56:06 +0000 (17:56 -0600)]
Bugfix: Incorrect macro definition _di_pthread_support_ vs _di_thread_support_.
The _di_pthread_support_ is used in the project but all of the programs have _di_thread_support_.
The project name is f_thread and not f_pthread so favor _di_thread_support_ over _di_pthread_support_.
Kevin Day [Fri, 13 Jan 2023 04:13:57 +0000 (22:13 -0600)]
Cleanup: Fix license confusion.
The documentation should be under the cc-by-sa-4.0 license.
However, the specification must be under the open-standard-license-1.0 license.
This file is documentation on the time specification.
If the documentation is under another license, the standard it describes must still be followed according to the open-standard-license-1.0 license.
The documentation would have to communicate that the standard it is describing is still under the open-standard-license-1.0 license even if the documentation itself is under a different license.
This creates a confusing and misleading situation.
Clarify the situation by setting the license to open-standard-license-1.0.
Setting the license explicitly to open-standard-license-1.0 should hopefully address any misunderstandings.
Kevin Day [Sat, 7 Jan 2023 15:57:39 +0000 (09:57 -0600)]
Update: Improve logic and design of install.sh script.
The destination directories should be created if they do not already exist.
Fail when the destination exists but is not a directory rather than fail if that directory does not exist.
Fix grammar in 'Failed to create work directories'.
The includes should be created only when work is not an empty string.
The recently added documentation needs to be created as well.
The settings is not created and needs to be created just like with documentation.
Ensure the existence of these directories allows the copy and paste to work correctly.
Ensure the normal directories get created in addition to the work directories.
I originally designed this to not have any opinions for the settings.
I've decided to relax that and apply the default settings of the 'etc/' directory.
This directory is now installed to.
If say the 'etc/' is actually needing to be the 'share/' directory, custom paths can be altered as well.
Make sure the documentation and settings can be disabled or have their destination paths altered.
Kevin Day [Sat, 7 Jan 2023 05:03:34 +0000 (23:03 -0600)]
Feature: Add missing documentation handling functionality to Featureless Make.
This is an oversight and should have been implemented before the first stable release.
This feature should be a core feature.
Documentation is important.
Make sure the handling of documentation is available for use.
This adds "build_sources_documentation" to the build settings to help facilitate documentation installation.
The documentation that is copied is expected to be under 'data/documentation/'.
The 'documentation' and 'documents' terminology overlaps to some degree.
The 'documentation' is a more specific thing and may not always be a 'document'.
The existing behavior around 'documents' is left unchanged.
The skeleton operation now creates the 'data/documentation/' directory.
The bootstrap.sh script now supports enabling and disabling documentation via the more common '--enable-doc' and '--disable-doc' parameters.
Kevin Day [Sat, 7 Jan 2023 04:53:37 +0000 (22:53 -0600)]
Cleanup: Fake program has incorrectly named variables.
The variables with 'build_sources_settings' should not have an 's' on the end.
The variables with 'build_process_post_s' and 'build_process_pre_s' should not have an '_s' on the end except for when it is a string.