Browse Source

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

Bob Mottram 7 years ago
parent
commit
b77f10f737
5 changed files with 34 additions and 24 deletions
  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 View File

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

+ 1
- 0
src/freedombone-app-xmpp View File

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

+ 1
- 0
src/freedombone-utils-setup View File

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

+ 24
- 24
tests/check-libs-owner.sh View File

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)
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
 fi
12
 fi
13
 if [ -d "/lib64" ];then
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
 fi
22
 fi
23
 if [ -d "/usr/lib" ];then
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
 fi
32
 fi
33
 if [ -d "/usr/lib64" ];then
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
 fi
42
 fi

+ 6
- 0
tests/output.sh View File

485
               if [ $2 -ne 0 ];then
485
               if [ $2 -ne 0 ];then
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
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
               fi
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
     V-38469)  if [ "$3" = "en" ]; then
495
     V-38469)  if [ "$3" = "en" ]; then
490
                   log_msg $2 'All system command files must have mode 755 or less permissive.'
496
                   log_msg $2 'All system command files must have mode 755 or less permissive.'