mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-01-10 07:06:43 +07:00
fix missing processing files bug
https://forums.whonix.org/t/permission-hardening/8655/16
This commit is contained in:
parent
fbe2479f48
commit
55faa7b997
@ -19,11 +19,32 @@ 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
|
||||
|
||||
arr=($line)
|
||||
|
||||
file_name="${arr[0]}"
|
||||
existing_mode="${arr[1]}"
|
||||
owner="${arr[2]}"
|
||||
group="${arr[3]}"
|
||||
|
||||
if [ "$file_name" = "" ]; then
|
||||
echo "ERROR: file_name is empty. line: '$line'" >&2
|
||||
continue
|
||||
fi
|
||||
if [ "$existing_mode" = "" ]; then
|
||||
echo "ERROR: existing_mode is empty. line: '$line'" >&2
|
||||
continue
|
||||
fi
|
||||
if [ "owner" = "" ]; then
|
||||
echo "ERROR: $owner is empty. line: '$line'" >&2
|
||||
continue
|
||||
fi
|
||||
if [ "$group" = "" ]; then
|
||||
echo "ERROR: $group is empty. line: '$line'" >&2
|
||||
continue
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user