Browse Source

Avoid nfs altogether

Bob Mottram 8 years ago
parent
commit
e634287f32
3 changed files with 1 additions and 63 deletions
  1. 1
    2
      src/freedombone-image-customise
  2. 0
    38
      src/freedombone-tests
  3. 0
    23
      src/freedombone-utils-setup

+ 1
- 2
src/freedombone-image-customise View File

1039
     chroot "$rootdir" apt-get -yq dist-upgrade
1039
     chroot "$rootdir" apt-get -yq dist-upgrade
1040
     chroot "$rootdir" apt-get -yq install ca-certificates
1040
     chroot "$rootdir" apt-get -yq install ca-certificates
1041
     chroot "$rootdir" apt-get -yq install apt-utils
1041
     chroot "$rootdir" apt-get -yq install apt-utils
1042
-    chroot "$rootdir" apt-get -yq install nfs-kernel-server
1043
 
1042
 
1044
     if [[ $ARCHITECTURE == 'amd64' ]]; then
1043
     if [[ $ARCHITECTURE == 'amd64' ]]; then
1045
         chroot "$rootdir" apt-get -yq install linux-image-amd64
1044
         chroot "$rootdir" apt-get -yq install linux-image-amd64
1206
     chroot "$rootdir" apt-get -yq install tripwire
1205
     chroot "$rootdir" apt-get -yq install tripwire
1207
 
1206
 
1208
     # filesystem optimisations
1207
     # filesystem optimisations
1209
-    sed -i 's|btrfs subvol=@|btrfs defaults,subvol=@,compress=lzo,ssd|g' $rootdir/etc/fstab
1208
+    #sed -i 's|btrfs subvol=@|btrfs defaults,subvol=@,compress=lzo,ssd|g' $rootdir/etc/fstab
1210
 }
1209
 }
1211
 
1210
 
1212
 function image_install_nodejs {
1211
 function image_install_nodejs {

+ 0
- 38
src/freedombone-tests View File

844
     output "V-38641" $? ${SETLANG}
844
     output "V-38641" $? ${SETLANG}
845
     ################
845
     ################
846
 
846
 
847
-    ##RHEL-06-000269
848
-    ##Remote file systems must be mounted with the nodev option.
849
-    if [ "$(mount | grep nfs | wc -l)" -gt 0 ];then
850
-        bash $STIG_TESTS_DIR/check-nfs.sh nodev >/dev/null 2>&1 &
851
-
852
-        stig_spinner $!
853
-        output "V-38652" $? ${SETLANG}
854
-    fi
855
-    ################
856
-
857
-    ##RHEL-06-000270
858
-    ##Remote file systems must be mounted with the nosuid option.
859
-    if [ "$(mount | grep nfs | wc -l)" -gt 0 ];then
860
-        bash $STIG_TESTS_DIR/check-nfs.sh nosuid >/dev/null 2>&1 &
861
-
862
-        stig_spinner $!
863
-        output "V-38654" $? ${SETLANG}
864
-    fi
865
-    ################
866
-
867
     ##RHEL-06-000271
847
     ##RHEL-06-000271
868
     ##The noexec option must be added to removable media partitions.
848
     ##The noexec option must be added to removable media partitions.
869
     if [ "$(grep -Hv ^0$ /sys/block/*/removable | sed s/removable:.*$/device\\/uevent/ | xargs grep -H ^DRIVER=sd | sed s/device.uevent.*$/size/ | xargs grep -Hv ^0$ | cut -d / -f 4 | wc -l)" -gt 0 ];then
849
     if [ "$(grep -Hv ^0$ /sys/block/*/removable | sed s/removable:.*$/device\\/uevent/ | xargs grep -H ^DRIVER=sd | sed s/device.uevent.*$/size/ | xargs grep -Hv ^0$ | cut -d / -f 4 | wc -l)" -gt 0 ];then
946
     output "V-38675" $? ${SETLANG}
926
     output "V-38675" $? ${SETLANG}
947
     ################
927
     ################
948
 
928
 
949
-    ##RHEL-06-000309
950
-    ##The NFS server must not have the insecure file locking option enabled.
951
-
952
-    bash $STIG_TESTS_DIR/check-nfs-insecure.sh > /dev/null 2>&1 &
953
-
954
-    stig_spinner $!
955
-    output "V-38677" $? ${SETLANG}
956
-    ################
957
-
958
     ##RHEL-06-000319
929
     ##RHEL-06-000319
959
     ##The system must limit users to 10 simultaneous system logins, or a site-defined number, in accordance with operational requirements.
930
     ##The system must limit users to 10 simultaneous system logins, or a site-defined number, in accordance with operational requirements.
960
 
931
 
1046
     output "V-38462" $? ${SETLANG}
1017
     output "V-38462" $? ${SETLANG}
1047
     ################
1018
     ################
1048
 
1019
 
1049
-    ##RHEL-06-000515
1050
-    ##The NFS server must not have the all_squash option enabled.
1051
-
1052
-    bash $STIG_TESTS_DIR/check-nfs-all-squash.sh > /dev/null 2>&1 &
1053
-
1054
-    stig_spinner $!
1055
-    output "V-38460" $? ${SETLANG}
1056
-    ################
1057
-
1058
     ##RHEL-06-000523
1020
     ##RHEL-06-000523
1059
     ##The systems local IPv6 firewall must implement a deny-all, allow-by-exception policy for inbound packets.
1021
     ##The systems local IPv6 firewall must implement a deny-all, allow-by-exception policy for inbound packets.
1060
 
1022
 

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

381
     fi
381
     fi
382
 }
382
 }
383
 
383
 
384
-function disable_nfs_insecure_locks {
385
-    apt-get -yq install nfs-kernel-server
386
-    if grep 'insecure_locks' /etc/exports; then
387
-        sed -i 's|,insecure_locks||g' /etc/exports
388
-        sed -i 's|insecure_locks,||g' /etc/exports
389
-        exportfs -a
390
-    fi
391
-}
392
-
393
 function remove_management_engine_interface {
384
 function remove_management_engine_interface {
394
     # see https://www.kernel.org/doc/Documentation/misc-devices/mei/mei.txt
385
     # see https://www.kernel.org/doc/Documentation/misc-devices/mei/mei.txt
395
     # Disabling this interface doesn't cure the problems of ME, but it
386
     # Disabling this interface doesn't cure the problems of ME, but it
488
 }
479
 }
489
 
480
 
490
 function lockdown_permissions {
481
 function lockdown_permissions {
491
-    if [ -d /etc/fs/nfs ]; then
492
-        remove_nfs
493
-    fi
494
     if [ -d /root/.npm ]; then
482
     if [ -d /root/.npm ]; then
495
         find /root/.npm -name package.json -exec chmod 700 {} \;
483
         find /root/.npm -name package.json -exec chmod 700 {} \;
496
     fi
484
     fi
625
     mark_completed $FUNCNAME
613
     mark_completed $FUNCNAME
626
 }
614
 }
627
 
615
 
628
-function remove_nfs {
629
-    apt-get -yq remove nfs-kernel-server
630
-    apt-get -yq remove nfs-common
631
-}
632
-
633
 function setup_firewall {
616
 function setup_firewall {
634
     function_check create_completion_file
617
     function_check create_completion_file
635
     create_completion_file
618
     create_completion_file
700
     function_check proc_filesystem_settings
683
     function_check proc_filesystem_settings
701
     proc_filesystem_settings
684
     proc_filesystem_settings
702
 
685
 
703
-    function_check remove_nfs
704
-    remove_nfs
705
-
706
     function_check optimise_filesystem
686
     function_check optimise_filesystem
707
     optimise_filesystem
687
     optimise_filesystem
708
 
688
 
730
     function_check remove_bluetooth
710
     function_check remove_bluetooth
731
     remove_bluetooth
711
     remove_bluetooth
732
 
712
 
733
-    function_check disable_nfs_insecure_locks
734
-    disable_nfs_insecure_locks
735
-
736
     function_check set_login_umask
713
     function_check set_login_umask
737
     set_login_umask
714
     set_login_umask
738
 
715