mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -04:00
count processed file system objects
to be able to verify if any were "forgotten"
This commit is contained in:
parent
195ea522f5
commit
fbe2479f48
@ -17,8 +17,11 @@ echo_wrapper() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_nosuid_statoverride_entry() {
|
add_nosuid_statoverride_entry() {
|
||||||
|
fso_to_process="${fso_without_trailing_slash}/"
|
||||||
|
counter=0
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
true "line: $line"
|
true "line: $line"
|
||||||
|
counter="$(( counter + 1 ))"
|
||||||
if ! read -r file_name existing_mode owner group; then
|
if ! read -r file_name existing_mode owner group; then
|
||||||
echo "ERROR: cannot parse line by 'stat' - line: '$line'" >&2
|
echo "ERROR: cannot parse line by 'stat' - line: '$line'" >&2
|
||||||
continue
|
continue
|
||||||
@ -97,7 +100,9 @@ add_nosuid_statoverride_entry() {
|
|||||||
|
|
||||||
## /lib will hit ARG_MAX.
|
## /lib will hit ARG_MAX.
|
||||||
## https://forums.whonix.org/t/kernel-hardening/7296/326
|
## 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() {
|
set_file_perms() {
|
||||||
|
Loading…
Reference in New Issue
Block a user