Home | History | Annotate | Line # | Download | only in etc
security revision 1.1
      1 #!/bin/sh -
      2 #
      3 #	@(#)security	5.3 (Berkeley) 5/28/91
      4 #
      5 PATH=/sbin:/bin:/usr/bin
      6 
      7 host=`hostname -s`
      8 echo "Subject: $host security check output"
      9 
     10 LOG=/var/log
     11 TMP=/tmp/_secure.$$
     12 
     13 echo "checking setuid files and devices:"
     14 MP=`mount -t ufs | sed 's;/dev/;&r;' | awk '{ print $1 " " $3 }'`
     15 set $MP
     16 ls -lgT `while test $# -ge 2; do
     17 	device=$1
     18 	shift
     19 	mount=$1
     20 	shift
     21 	ncheck -s $device | sed -e "/:$/d" -e "/\/dev\//d" \
     22 	    -e "s;[^/]*;$mount;" -e "s;//;/;g" | sort
     23 done` > $TMP
     24 
     25 if cmp $LOG/setuid.today $TMP >/dev/null; then :; else
     26 	echo "$host setuid/device diffs:"
     27 	diff $LOG/setuid.today $TMP
     28 	mv $LOG/setuid.today $LOG/setuid.yesterday
     29 	mv $TMP $LOG/setuid.today
     30 fi
     31 rm -f $TMP
     32 
     33 echo ""
     34 echo ""
     35 echo "checking for uids of 0:"
     36 awk 'BEGIN {FS=":"} $3=="0" {print $1,$3}' /etc/master.passwd
     37