]> Kevux Git Server - fll/commit
Update: numerous changes, most notably path and vfork to fork changes
authorKevin Day <thekevinday@gmail.com>
Sun, 17 May 2020 02:56:52 +0000 (21:56 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 17 May 2020 03:05:39 +0000 (22:05 -0500)
commit65c180baf81cae13ccb2af4b19e18eb4f38c4169
tree0446ae26391e92bbeab2ee5f41ec87bb2b9660a2
parentfa4ef7c85c47ce0ce7966ced7fd61b3b1052138b
Update: numerous changes, most notably path and vfork to fork changes

Replace vfork() calls with fork().
- I have determined that vfork() is not safe.
- When calling clearenv() inside a vfork() child process, the parent process' environment ends up getting cleared as well!
- The child can alter the parents memory according to manpages, so stop using vfork() entirely.

Add path processing functions and related defines.

Enable path processing to allow for execvpe()-like behavior can be implemented.
- The execvpe() function is not used because it is not POSIX.
- Manually process the PATH environment to determine what to execute, even when PATH enviornment gets cleared.

Some consistency improvements in defines, such as f_console_max_size to f_console_length_size.

Fix mistake in memcpy usage, dynamic strings use char * for their string so passing & is incorrect.

The f_file_exists() is using access().
- This is misleading and incorect.
- Use stat() to determine if file exists because it doesn't require access to the file (aside from directory access) to check existence.
- Add a new function f_file_access() as the old implementation of f_file_exists().

The fll_execute programs now support additional functions for clearing environment variables.
- This effectively sandboxes the environment variables before calling the program.
50 files changed:
build/level_0/settings
build/monolithic/settings
level_0/f_console/c/console.c
level_0/f_console/c/console.h
level_0/f_environment/c/private-environment.c
level_0/f_file/c/file.c
level_0/f_file/c/file.h
level_0/f_path/c/path.c [new file with mode: 0644]
level_0/f_path/c/path.h
level_0/f_path/data/build/dependencies
level_0/f_path/data/build/settings
level_0/f_string/c/string.h
level_1/fl_file/c/file.c
level_1/fl_status/c/status.h
level_1/fl_string/c/private-string.c
level_1/fl_string/c/private-string.h
level_1/fl_string/c/string.c
level_1/fl_string/c/string.h
level_1/fl_utf/c/private-utf.h
level_1/fl_utf/c/utf.h
level_1/fl_utf_file/c/utf_file.c
level_2/fll_execute/c/execute.c
level_2/fll_execute/c/execute.h
level_2/fll_execute/c/private-execute.h
level_2/fll_execute/data/build/dependencies
level_2/fll_execute/data/build/settings
level_2/fll_fss/c/fss.c
level_2/fll_fss/c/fss.h
level_2/fll_fss/c/fss_basic.c
level_2/fll_fss/c/fss_basic_list.c
level_2/fll_fss/c/fss_extended.c
level_2/fll_fss/c/fss_extended_list.c
level_2/fll_program/c/program.c
level_2/fll_program/c/program.h
level_3/firewall/data/build/settings
level_3/fss_basic_list_read/c/private-fss_basic_list_read.c
level_3/fss_basic_list_read/data/build/settings
level_3/fss_basic_list_write/data/build/settings
level_3/fss_basic_read/c/private-fss_basic_read.c
level_3/fss_basic_read/data/build/settings
level_3/fss_basic_write/data/build/settings
level_3/fss_extended_list_read/c/private-fss_extended_list_read.c
level_3/fss_extended_list_read/data/build/settings
level_3/fss_extended_read/c/private-fss_extended_read.c
level_3/fss_extended_read/data/build/settings
level_3/fss_extended_write/data/build/settings
level_3/fss_status_code/data/build/settings
level_3/init/c/init.h
level_3/init/data/build/settings
level_3/status_code/data/build/settings