瀏覽代碼

Show non-compliant library files

Bob Mottram 7 年之前
父節點
當前提交
45e70c80f2
共有 1 個檔案被更改,包括 29 行新增25 行删除
  1. 29
    25
      tests/check-libs-owner.sh

+ 29
- 25
tests/check-libs-owner.sh 查看文件

2
 
2
 
3
 if [ -d "/lib" ];then
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
 fi
13
 fi
13
 if [ -d "/lib64" ];then
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
 fi
24
 fi
23
 if [ -d "/usr/lib" ];then
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
 fi
35
 fi
33
 if [ -d "/usr/lib64" ];then
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
 fi
46
 fi