From ba565fa6ce789b6b47f97e0ea98fda8f7f96a0d8 Mon Sep 17 00:00:00 2001 From: Mike Pritchard Date: Sun, 23 Feb 1997 21:34:34 +0000 Subject: [PATCH] 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. --- etc/security | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/security b/etc/security index 7e2f6abb973..c63523e7dd3 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