mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-02-12 23:31:27 -05:00
add sanity test for file_name output from stat
This commit is contained in:
parent
b9dfe70a01
commit
ced02fb9e0
@ -97,6 +97,15 @@ add_nosuid_statoverride_entry() {
|
|||||||
existing_owner="${arr[2]}"
|
existing_owner="${arr[2]}"
|
||||||
existing_group="${arr[3]}"
|
existing_group="${arr[3]}"
|
||||||
|
|
||||||
|
if [ ! "$file_name" = "$file_name_from_stat" ]; then
|
||||||
|
log error "\
|
||||||
|
file_name is different from file_name_from_stat:
|
||||||
|
line: '${line}'
|
||||||
|
file_name '${file_name}'
|
||||||
|
file_name_from_stat: '${file_name_from_stat}'" >&2
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
if test -z "${existing_mode}"; then
|
if test -z "${existing_mode}"; then
|
||||||
log error "Existing mode is empty in line: ${line}" >&2
|
log error "Existing mode is empty in line: ${line}" >&2
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user