From 45e70c80f214481324359c171fd8dc2cf7079e84 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Jan 2018 11:22:47 +0000 Subject: [PATCH] Show non-compliant library files --- tests/check-libs-owner.sh | 52 +++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/tests/check-libs-owner.sh b/tests/check-libs-owner.sh index ecda7471..f7eb1821 100644 --- a/tests/check-libs-owner.sh +++ b/tests/check-libs-owner.sh @@ -2,41 +2,45 @@ if [ -d "/lib" ];then - COUNT=$(find -L /lib \! -user root -exec ls -l {} \; | grep -v '> /dev/null' | wc -l) + COUNT=$(find -L /lib \! -user root -exec ls -l {} \; | grep -v '> /dev/null' | wc -l) - if [ $COUNT -eq 0 ];then - : - else - exit 1 - fi + if [ $COUNT -eq 0 ];then + : + else + find -L /lib \! -user root -exec ls -l {} \; | grep -v '> /dev/null' + exit 1 + fi fi if [ -d "/lib64" ];then - COUNT=$(find -L /lib64 \! -user root -exec ls -l {} \; |wc -l) + COUNT=$(find -L /lib64 \! -user root -exec ls -l {} \; |wc -l) - if [ $COUNT -eq 0 ];then - : - else - exit 1 - fi + if [ $COUNT -eq 0 ];then + : + else + find -L /lib64 \! -user root -exec ls -l {} \; + exit 1 + fi fi if [ -d "/usr/lib" ];then - COUNT=$(find -L /usr/lib \! -user root -exec ls -l {} \; |wc -l) + COUNT=$(find -L /usr/lib \! -user root -exec ls -l {} \; |wc -l) - if [ $COUNT -eq 0 ];then - : - else - exit 1 - fi + if [ $COUNT -eq 0 ];then + : + else + find -L /usr/lib \! -user root -exec ls -l {} \; + exit 1 + fi fi if [ -d "/usr/lib64" ];then - COUNT=$(find -L /usr/lib64 \! -user root -exec ls -l {} \; |wc -l) + COUNT=$(find -L /usr/lib64 \! -user root -exec ls -l {} \; |wc -l) - if [ $COUNT -eq 0 ];then - : - else - exit 1 - fi + if [ $COUNT -eq 0 ];then + : + else + find -L /usr/lib64 \! -user root -exec ls -l {} \; + exit 1 + fi fi