Browse Source

Show non-compliant library files

Bob Mottram 7 years ago
parent
commit
45e70c80f2
1 changed files with 29 additions and 25 deletions
  1. 29
    25
      tests/check-libs-owner.sh

+ 29
- 25
tests/check-libs-owner.sh View File

@@ -2,41 +2,45 @@
2 2
 
3 3
 if [ -d "/lib" ];then
4 4
 
5
-        COUNT=$(find -L /lib  \! -user root  -exec ls -l {} \; | grep -v '> /dev/null' | wc -l)
6
-
7
-        if [ $COUNT -eq 0 ];then
8
-                :
9
-        else
10
-                exit 1
11
-        fi
5
+    COUNT=$(find -L /lib  \! -user root  -exec ls -l {} \; | grep -v '> /dev/null' | wc -l)
6
+
7
+    if [ $COUNT -eq 0 ];then
8
+        :
9
+    else
10
+        find -L /lib  \! -user root  -exec ls -l {} \; | grep -v '> /dev/null'
11
+        exit 1
12
+    fi
12 13
 fi
13 14
 if [ -d "/lib64" ];then
14 15
 
15
-        COUNT=$(find -L /lib64  \! -user root  -exec ls -l {} \; |wc -l)
16
+    COUNT=$(find -L /lib64  \! -user root  -exec ls -l {} \; |wc -l)
16 17
 
17
-        if [ $COUNT -eq 0 ];then
18
-                :
19
-        else
20
-                exit 1
21
-        fi
18
+    if [ $COUNT -eq 0 ];then
19
+        :
20
+    else
21
+        find -L /lib64  \! -user root  -exec ls -l {} \;
22
+        exit 1
23
+    fi
22 24
 fi
23 25
 if [ -d "/usr/lib" ];then
24 26
 
25
-        COUNT=$(find -L /usr/lib  \! -user root  -exec ls -l {} \; |wc -l)
27
+    COUNT=$(find -L /usr/lib  \! -user root  -exec ls -l {} \; |wc -l)
26 28
 
27
-        if [ $COUNT -eq 0 ];then
28
-                :
29
-        else
30
-                exit 1
31
-        fi
29
+    if [ $COUNT -eq 0 ];then
30
+        :
31
+    else
32
+        find -L /usr/lib  \! -user root  -exec ls -l {} \;
33
+        exit 1
34
+    fi
32 35
 fi
33 36
 if [ -d "/usr/lib64" ];then
34 37
 
35
-        COUNT=$(find -L /usr/lib64  \! -user root  -exec ls -l {} \; |wc -l)
38
+    COUNT=$(find -L /usr/lib64  \! -user root  -exec ls -l {} \; |wc -l)
36 39
 
37
-        if [ $COUNT -eq 0 ];then
38
-                :
39
-        else
40
-                exit 1
41
-        fi
40
+    if [ $COUNT -eq 0 ];then
41
+        :
42
+    else
43
+        find -L /usr/lib64  \! -user root  -exec ls -l {} \;
44
+        exit 1
45
+    fi
42 46
 fi