security.d/chk_exports

changeset 23
b66522a5726e
parent 17
65656789da08
equal deleted inserted replaced
22:32af3eef438b 23:b66522a5726e
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 ############################################################################# 3 #############################################################################
4 # Copyright (C) 2005-2013 4 # Copyright (C) 2005-2020
5 # 5 #
6 # Michiel Broek <mbse at mbse.eu> 6 # Michiel Broek <mbse at mbse.eu>
7 # 7 #
8 # This file is part of SlackSecCheckScripts. 8 # This file is part of SlackSecCheckScripts.
9 # 9 #
43 # NFS exports shouldn't be globally exported 43 # NFS exports shouldn't be globally exported
44 # 44 #
45 if [ -f /etc/exports ]; then 45 if [ -f /etc/exports ]; then
46 cat /etc/exports | awk '{ 46 cat /etc/exports | awk '{
47 # ignore comments and blank lines 47 # ignore comments and blank lines
48 if ($0 ~ /^\#/ || $0 ~ /^$/ ) 48 if ($0 ~ /^#/ || $0 ~ /^$/ )
49 next; 49 next;
50 readwrite = 0; 50 readwrite = 0;
51 global = 0; 51 global = 0;
52 for (i = 2; i <= NF; ++i) { 52 for (i = 2; i <= NF; ++i) {
53 if ($i ~ /*/) 53 if ($i ~ /*/)

mercurial