This commit is contained in:
Patrick Schleizer 2019-12-20 03:03:40 -05:00
parent c626290673
commit b31d8cd3fc
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -45,12 +45,12 @@ add_statoverride_entry() {
echo "suid - file_name: '$file_name' | existing_mode: '$existing_mode' | new_mode: '$new_mode'" echo "suid - 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 ${existing_mode:1} $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"
echo_wrapper dpkg-statoverride --add --update "$owner" "$group" "${existing_mode:1}" "$file_name" echo_wrapper dpkg-statoverride --add --update "$owner" "$group" "$new_mode" "$file_name"
fi fi
else else
echo_wrapper dpkg-statoverride --add --update "$owner" "$group" "${existing_mode:1}" "$file_name" echo_wrapper dpkg-statoverride --add --update "$owner" "$group" "$new_mode" "$file_name"
fi fi
fi fi
done < <( stat -c "%n %a %U %G" "${fso%/}/"** ) done < <( stat -c "%n %a %U %G" "${fso%/}/"** )