mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-06-05 15:08:52 -04:00
parse drop-in config folder rather than only one config file
This commit is contained in:
parent
66fd31189d
commit
46466c12ad
2 changed files with 8 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue