Преглед на файлове

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram преди 7 години
родител
ревизия
b77f10f737
променени са 5 файла, в които са добавени 34 реда и са изтрити 24 реда
  1. 2
    0
      src/freedombone-addcert
  2. 1
    0
      src/freedombone-app-xmpp
  3. 1
    0
      src/freedombone-utils-setup
  4. 24
    24
      tests/check-libs-owner.sh
  5. 6
    0
      tests/output.sh

+ 2
- 0
src/freedombone-addcert Целия файл

@@ -239,6 +239,7 @@ function add_cert_letsencrypt {
239 239
         chgrp -R ssl-cert /etc/letsencrypt
240 240
         chmod -R 600 /etc/letsencrypt
241 241
         chmod -R g=rX /etc/letsencrypt
242
+        chown -R root:ssl-cert /etc/letsencrypt
242 243
         systemctl start nginx
243 244
         exit 63216
244 245
     fi
@@ -288,6 +289,7 @@ function add_cert_letsencrypt {
288 289
     chgrp -R ssl-cert /etc/letsencrypt
289 290
     chmod -R 600 /etc/letsencrypt
290 291
     chmod -R g=rX /etc/letsencrypt
292
+    chown -R root:ssl-cert /etc/letsencrypt
291 293
 
292 294
     nginx_ensite ${LETSENCRYPT_HOSTNAME}
293 295
     systemctl start nginx

+ 1
- 0
src/freedombone-app-xmpp Целия файл

@@ -689,6 +689,7 @@ function xmpp_onion_addresses {
689 689
     echo '  ["wtfismyip.com"] = "ofkztxcohimx34la.onion";' >> $filename
690 690
     echo '  ["prosody.xmpp.is"] = "y2qmqomqpszzryei.onion";' >> $filename
691 691
     echo '  ["xndr.de"] = "trcubpttd6zkc3tf.onion";' >> $filename
692
+    echo '  ["jabber.cat"] = "sybzodlxacch7st7.onion";' >> $filename
692 693
     echo '  ["trashserver.net"] = "m4c722bvc2r7brnn.onion";' >> $filename
693 694
     echo '};' >> $filename
694 695
 }

+ 1
- 0
src/freedombone-utils-setup Целия файл

@@ -645,6 +645,7 @@ function lockdown_permissions {
645 645
     if [ -d /etc/letsencrypt ]; then
646 646
         chmod -R 600 /etc/letsencrypt
647 647
         chmod -R g=rX /etc/letsencrypt
648
+        chown -R root:ssl-cert /etc/letsencrypt
648 649
     fi
649 650
     chown -f root:root /etc/motd /etc/issue*
650 651
     chmod -f 0444 /etc/motd /etc/issue*

+ 24
- 24
tests/check-libs-owner.sh Целия файл

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

+ 6
- 0
tests/output.sh Целия файл

@@ -485,6 +485,12 @@ time, are stored in the following directories by default:\n\n/lib\n/lib64\n/usr/
485 485
               if [ $2 -ne 0 ];then
486 486
                   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
487 487
               fi
488
+              find -L /lib  \! -user root  -exec ls -l {} \; | grep -v '> /dev/null'
489
+              find -L /lib64  \! -user root  -exec ls -l {} \;
490
+              find -L /usr/lib  \! -user root  -exec ls -l {} \;
491
+              if [ -d /usr/lib64 ]; then
492
+                  find -L /usr/lib64  \! -user root  -exec ls -l {} \;
493
+              fi
488 494
               ;;
489 495
     V-38469)  if [ "$3" = "en" ]; then
490 496
                   log_msg $2 'All system command files must have mode 755 or less permissive.'