110.neggrpperm (87514) | 110.neggrpperm (96048) |
---|---|
1#!/bin/sh - 2# 3# Copyright (c) 2001 The FreeBSD Project 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# | 1#!/bin/sh - 2# 3# Copyright (c) 2001 The FreeBSD Project 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: head/etc/periodic/security/100.chksetuid 87514 2001-12-07 23:57:39Z cjc $ | 27# $FreeBSD: head/etc/periodic/security/100.chksetuid 96048 2002-05-05 00:59:37Z cjc $ |
28# 29 30# If there is a global system configuration file, suck it in. 31# 32if [ -r /etc/defaults/periodic.conf ] 33then 34 . /etc/defaults/periodic.conf 35 source_periodic_confs --- 11 unchanged lines hidden (view full) --- 47 MP=`mount -t ufs | grep -v " nosuid" | awk '{ print $3 }' | sort` 48 set ${MP} 49 while [ $# -ge 1 ]; do 50 mount=$1 51 shift 52 find $mount -xdev -type f \ 53 \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ 54 \( -perm -u+s -or -perm -g+s \) -print0 | 28# 29 30# If there is a global system configuration file, suck it in. 31# 32if [ -r /etc/defaults/periodic.conf ] 33then 34 . /etc/defaults/periodic.conf 35 source_periodic_confs --- 11 unchanged lines hidden (view full) --- 47 MP=`mount -t ufs | grep -v " nosuid" | awk '{ print $3 }' | sort` 48 set ${MP} 49 while [ $# -ge 1 ]; do 50 mount=$1 51 shift 52 find $mount -xdev -type f \ 53 \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ 54 \( -perm -u+s -or -perm -g+s \) -print0 |
55 done | xargs -0 -n 20 ls -liTd | sort +10 > ${TMP} | 55 done | xargs -0 -n 20 ls -liTd | sed 's/^ *//' | sort +10 > ${TMP} |
56 57 if [ ! -f ${LOG}/setuid.today ]; then 58 rc=1 59 echo "No ${LOG}/setuid.today" 60 cp ${TMP} ${LOG}/setuid.today || rc=3 61 fi 62 63 if ! cmp ${LOG}/setuid.today ${TMP} >/dev/null 64 then 65 [ $rc -lt 1 ] && rc=1 66 echo "${host} setuid diffs:" | 56 57 if [ ! -f ${LOG}/setuid.today ]; then 58 rc=1 59 echo "No ${LOG}/setuid.today" 60 cp ${TMP} ${LOG}/setuid.today || rc=3 61 fi 62 63 if ! cmp ${LOG}/setuid.today ${TMP} >/dev/null 64 then 65 [ $rc -lt 1 ] && rc=1 66 echo "${host} setuid diffs:" |
67 diff -w ${LOG}/setuid.today ${TMP} | 67 diff -b ${LOG}/setuid.today ${TMP} |
68 mv ${LOG}/setuid.today ${LOG}/setuid.yesterday || rc=3 69 mv ${TMP} ${LOG}/setuid.today || rc=3 70 fi 71 rm -f ${TMP};; 72 *) rc=0;; 73esac 74 75exit $rc | 68 mv ${LOG}/setuid.today ${LOG}/setuid.yesterday || rc=3 69 mv ${TMP} ${LOG}/setuid.today || rc=3 70 fi 71 rm -f ${TMP};; 72 *) rc=0;; 73esac 74 75exit $rc |