From b31d8cd3fc905b61707f77e08cff72e74f18c46b Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Fri, 20 Dec 2019 03:03:40 -0500 Subject: [PATCH] fix --- usr/lib/security-misc/permission-hardening | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/lib/security-misc/permission-hardening b/usr/lib/security-misc/permission-hardening index c5e65d6..c5688ee 100755 --- a/usr/lib/security-misc/permission-hardening +++ b/usr/lib/security-misc/permission-hardening @@ -45,12 +45,12 @@ add_statoverride_entry() { 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 "$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 --add --update "$owner" "$group" "${existing_mode:1}" "$file_name" + echo_wrapper dpkg-statoverride --add --update "$owner" "$group" "$new_mode" "$file_name" fi 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 done < <( stat -c "%n %a %U %G" "${fso%/}/"** )