From f6f6b290712a4a9ef7785aa25887659927eb0df3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Jan 2018 11:26:30 +0000 Subject: [PATCH] Show non-compliant library files --- tests/check-libs-owner.sh | 4 ---- tests/output.sh | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/check-libs-owner.sh b/tests/check-libs-owner.sh index f7eb1821..b99ef1d7 100644 --- a/tests/check-libs-owner.sh +++ b/tests/check-libs-owner.sh @@ -7,7 +7,6 @@ if [ -d "/lib" ];then if [ $COUNT -eq 0 ];then : else - find -L /lib \! -user root -exec ls -l {} \; | grep -v '> /dev/null' exit 1 fi fi @@ -18,7 +17,6 @@ if [ -d "/lib64" ];then if [ $COUNT -eq 0 ];then : else - find -L /lib64 \! -user root -exec ls -l {} \; exit 1 fi fi @@ -29,7 +27,6 @@ if [ -d "/usr/lib" ];then if [ $COUNT -eq 0 ];then : else - find -L /usr/lib \! -user root -exec ls -l {} \; exit 1 fi fi @@ -40,7 +37,6 @@ if [ -d "/usr/lib64" ];then if [ $COUNT -eq 0 ];then : else - find -L /usr/lib64 \! -user root -exec ls -l {} \; exit 1 fi fi diff --git a/tests/output.sh b/tests/output.sh index 2174039b..08b18fee 100644 --- a/tests/output.sh +++ b/tests/output.sh @@ -485,6 +485,10 @@ time, are stored in the following directories by default:\n\n/lib\n/lib64\n/usr/ if [ $2 -ne 0 ];then printf '\n######################\n\nSTIG-ID:RHEL-06-000046\n\nVulnerability Discussion: Files from shared library directories are loaded into the address space of processes (including privileged ones) or of the kernel itself at runtime. Proper ownership is necessary to protect the integrity of the system.\n\nFix text: System-wide shared library files, which are linked to executables during process load time or run time, are stored in the following directories by default:\n\n/lib\n/lib64\n/usr/lib\n/usr/lib64\n\nIf any file in these directories is found to be owned by a user other than root, correct its ownership with the following command:\n\n#chown root [FILE]\n\n######################\n\n' >> $LOG fi + find -L /lib \! -user root -exec ls -l {} \; | grep -v '> /dev/null' + find -L /lib64 \! -user root -exec ls -l {} \; + find -L /usr/lib \! -user root -exec ls -l {} \; + find -L /usr/lib64 \! -user root -exec ls -l {} \; ;; V-38469) if [ "$3" = "en" ]; then log_msg $2 'All system command files must have mode 755 or less permissive.'