mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-25 09:49:25 -05:00
parse drop-in config folder rather than only one config file
This commit is contained in:
parent
66fd31189d
commit
46466c12ad
@ -7,8 +7,6 @@
|
||||
|
||||
exit_code=0
|
||||
|
||||
config_file="/etc/permission-hardening.conf"
|
||||
|
||||
echo_wrapper() {
|
||||
echo "run: $@"
|
||||
"$@"
|
||||
@ -161,6 +159,13 @@ set_file_perms() {
|
||||
done < "$config_file"
|
||||
}
|
||||
|
||||
set_file_perms
|
||||
parse_config_folder() {
|
||||
shopt -s nullglob
|
||||
for config_file in /etc/permission-hardening.d/*.conf /usr/local/etc/permission-hardening.d/*.conf; do
|
||||
set_file_perms
|
||||
done
|
||||
}
|
||||
|
||||
parse_config_folder
|
||||
|
||||
exit "$exit_code"
|
||||
|
Loading…
Reference in New Issue
Block a user