This commit is contained in:
Patrick Schleizer 2019-12-20 10:02:46 -05:00
parent 50b8f65490
commit e36868e675
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -94,8 +94,6 @@ add_nosuid_statoverride_entry() {
# new_mode=744 # new_mode=744
# fi # fi
echo "INFO: $setuid_output $setguid_output found - file_name: '$file_name' | existing_mode: '$existing_mode' | new_mode: '$new_mode'"
is_whitelisted="" is_whitelisted=""
for white_list_entry in $whitelist ; do for white_list_entry in $whitelist ; do
if [ "$file_name" = "$white_list_entry" ]; then if [ "$file_name" = "$white_list_entry" ]; then
@ -106,10 +104,12 @@ add_nosuid_statoverride_entry() {
done done
if [ "$is_whitelisted" = "true" ]; then if [ "$is_whitelisted" = "true" ]; then
echo "INFO: skip whitelisted: '$file_name'" echo "INFO: SKIP whitelisted - $setuid_output $setguid_output found - file_name: '$file_name' | existing_mode: '$existing_mode'"
continue continue
fi fi
echo "INFO: $setuid_output $setguid_output found - file_name: '$file_name' | existing_mode: '$existing_mode' | new_mode: '$new_mode'"
if dpkg-statoverride --list | grep -q "$file_name"; then if dpkg-statoverride --list | grep -q "$file_name"; then
if ! dpkg-statoverride --list | grep -q "$owner $group $new_mode $file_name"; then if ! dpkg-statoverride --list | grep -q "$owner $group $new_mode $file_name"; then
echo_wrapper dpkg-statoverride --remove "$file_name" echo_wrapper dpkg-statoverride --remove "$file_name"