mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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
f51673c34f
commit
ba565fa6ce
1 changed files with 4 additions and 4 deletions
|
|
@ -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 a new issue