From 4219347f0a739ed1ea93a596968295ddcd3a940f Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sun, 5 Nov 2023 16:43:44 -0500 Subject: [PATCH] fix permission-hardener config parsing issue --- usr/bin/permission-hardening | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/bin/permission-hardening b/usr/bin/permission-hardening index b1cdd79..369d9f0 100755 --- a/usr/bin/permission-hardening +++ b/usr/bin/permission-hardening @@ -325,12 +325,12 @@ set_file_perms() { continue fi - if ! echo "${passwd_file_contents}" | grep --quiet --fixed-strings "${owner_from_config}:" ; then + if ! grep --quiet --fixed-strings "${owner_from_config}:" /var/lib/permission-hardening/private/passwd ; then echo "ERROR: owner_from_config '$owner_from_config' does not exist!" >&2 continue fi - if ! echo "${group_file_contents}" | grep --quiet --fixed-strings "${group_from_config}:" ; then + if ! grep --quiet --fixed-strings "${group_from_config}:" /var/lib/permission-hardening/private/group ; then echo "ERROR: group_from_config '$group_from_config' does not exist!" >&2 continue fi