mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-06-07 15:02:40 -04:00
Unify method to find SUID files
This commit is contained in:
parent
05c1711b16
commit
b7796a5334
1 changed files with 7 additions and 1 deletions
|
@ -60,10 +60,16 @@ add_nosuid_statoverride_entry() {
|
||||||
local fso_to_process
|
local fso_to_process
|
||||||
fso_to_process="${fso}"
|
fso_to_process="${fso}"
|
||||||
local should_be_counter
|
local should_be_counter
|
||||||
should_be_counter="$(find "${fso_to_process}" -perm /u=s,g=s | wc -l)" || true
|
should_be_counter=0
|
||||||
local counter_actual
|
local counter_actual
|
||||||
counter_actual=0
|
counter_actual=0
|
||||||
|
|
||||||
|
local dummy_line
|
||||||
|
while read -r dummy_line; do
|
||||||
|
true "DEBUG: test would evaluate parse" "${dummy_line}"
|
||||||
|
should_be_counter=$((should_be_counter + 1))
|
||||||
|
done < <(find "${fso_to_process}" -perm /u=s,g=s -print0 | xargs -I{} -0 stat -c "%n %a %U %G" {})
|
||||||
|
|
||||||
local line
|
local line
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
true "line: ${line}"
|
true "line: ${line}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue