mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-28 12:07:10 +01:00
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.
This commit is contained in:
parent
585f595a37
commit
76a899ae26
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user