summaryrefslogtreecommitdiffstats
path: root/etc/security
diff options
context:
space:
mode:
authormpp <mpp@FreeBSD.org>1997-02-23 21:34:34 +0000
committermpp <mpp@FreeBSD.org>1997-02-23 21:34:34 +0000
commit76a899ae26f03a113631b33475e6d64fbe925b55 (patch)
treed7efeebff550ea187bcedf1d7e085290bcbe89e5 /etc/security
parent585f595a376a631ea26ac892478724d3cc2c2569 (diff)
downloadFreeBSD-src-76a899ae26f03a113631b33475e6d64fbe925b55.zip
FreeBSD-src-76a899ae26f03a113631b33475e6d64fbe925b55.tar.gz
When looking for setuid files, call find with -print0 and xargs with -0.
This allows find to pass files with "illegal" characters to xargs in a safe manner. Note: due to the manner in which the file names are now passed between find and xargs, the files are now sorted differently than before. The first /etc/security run after installing this change may result in a lot of output when nothing did in fact change. Closes PR# 1910. 2.2 candidate.
Diffstat (limited to 'etc/security')
-rw-r--r--etc/security8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/security b/etc/security
index 7e2f6ab..c63523e 100644
--- a/etc/security
+++ b/etc/security
@@ -1,7 +1,7 @@
#!/bin/sh -
#
# @(#)security 5.3 (Berkeley) 5/28/91
-# $Id$
+# $Id: security,v 1.18 1997/02/23 09:20:52 peter Exp $
#
PATH=/sbin:/bin:/usr/bin
LC_ALL=C; export LC_ALL
@@ -30,10 +30,10 @@ set $MP
while test $# -ge 1; do
mount=$1
shift
- find -X $mount -xdev -type f \
+ find $mount -xdev -type f \
\( -perm -u+x -or -perm -g+x -or -perm -o+x \) \
- \( -perm -u+s -or -perm -g+s \) | sort
-done | xargs -n 20 ls -lgTd > $TMP
+ \( -perm -u+s -or -perm -g+s \) -print0
+done | xargs -0 -n 20 ls -lgTd | sort +9 > $TMP
if [ ! -f $LOG/setuid.today ] ; then
separator
OpenPOWER on IntegriCloud