diff --git a/usr/lib/security-misc/permission-hardening b/usr/lib/security-misc/permission-hardening index 1e3239e..76e2638 100755 --- a/usr/lib/security-misc/permission-hardening +++ b/usr/lib/security-misc/permission-hardening @@ -17,8 +17,11 @@ echo_wrapper() { } add_nosuid_statoverride_entry() { + fso_to_process="${fso_without_trailing_slash}/" + counter=0 while read -r line; do true "line: $line" + counter="$(( counter + 1 ))" if ! read -r file_name existing_mode owner group; then echo "ERROR: cannot parse line by 'stat' - line: '$line'" >&2 continue @@ -97,7 +100,9 @@ add_nosuid_statoverride_entry() { ## /lib will hit ARG_MAX. ## https://forums.whonix.org/t/kernel-hardening/7296/326 - done < <( find "${fso_without_trailing_slash}/" -print0 | xargs -I{} -0 stat -c "%n %a %U %G" {} ) + done < <( find "$fso_to_process" -print0 | xargs -I{} -0 stat -c "%n %a %U %G" {} ) + + echo "INFO: fso_to_process: '$fso_to_process' | counter: '$counter'" } set_file_perms() {