From 01dd567f8b3764ae241a4df39d54617089532b9d Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Fri, 20 Dec 2019 03:16:43 -0500 Subject: [PATCH] fix, if fso has exactly the mode we want (not 3 instead of 4 string length), not need to reset it --- usr/lib/security-misc/permission-hardening | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/lib/security-misc/permission-hardening b/usr/lib/security-misc/permission-hardening index c8642f9..8ca1f47 100755 --- a/usr/lib/security-misc/permission-hardening +++ b/usr/lib/security-misc/permission-hardening @@ -114,7 +114,7 @@ set_file_perms() { if dpkg-statoverride --list | grep -q "${fso%/}"; then ## If there is an entry for the fso, but the owner/group/mode do not ## match, we remove and re-add the entry to update it. - if ! dpkg-statoverride --list | grep -q "$owner $group ${mode_from_config:1} ${fso%/}"; then + if ! dpkg-statoverride --list | grep -q "$owner $group $mode_from_config ${fso%/}"; then echo_wrapper dpkg-statoverride --remove "${fso}" add_statoverride_entry fi