security.d/chk_setid

changeset 21
735fe1b89e5a
parent 20
1d18ebb9e279
equal deleted inserted replaced
20:1d18ebb9e279 21:735fe1b89e5a
49 49
50 50
51 if [ ! -f $CURR ]; then 51 if [ ! -f $CURR ]; then
52 # No database, install new database 52 # No database, install new database
53 find $FSS \( -mount \( -perm -u+s -a ! -type d \) -o \( -perm -g+s -a ! -type d \) \) -print0 2>/dev/null | \ 53 find $FSS \( -mount \( -perm -u+s -a ! -type d \) -o \( -perm -g+s -a ! -type d \) \) -print0 2>/dev/null | \
54 xargs -0 /bin/ls -ld --full-time | sort -k9 > $CURR 54 xargs -0r /bin/ls -ld --full-time | sort -k9 > $CURR
55 exit 55 exit
56 fi 56 fi
57 57
58 # Database is present, create temp database 58 # Database is present, create temp database
59 # 59 #
60 find $FSS \( -mount \( -perm -u+s -a ! -type d \) -o \( -perm -g+s -a ! -type d \) \) -print0 2>/dev/null | \ 60 find $FSS \( -mount \( -perm -u+s -a ! -type d \) -o \( -perm -g+s -a ! -type d \) \) -print0 2>/dev/null | \
61 xargs -0 /bin/ls -ld --full-time | sort -k9 > $TMP1 61 xargs -0r /bin/ls -ld --full-time | sort -k9 > $TMP1
62 changed=0 62 changed=0
63 63
64 diff $TMP1 $CURR > $TMP2 64 diff $TMP1 $CURR > $TMP2
65 if [ -s $TMP2 ]; then 65 if [ -s $TMP2 ]; then
66 egrep '>' $TMP2 > $TMP3 66 egrep '>' $TMP2 > $TMP3

mercurial