summaryrefslogtreecommitdiffstats
path: root/etc/security
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-04-18 10:34:07 +0000
committerache <ache@FreeBSD.org>1996-04-18 10:34:07 +0000
commit599cdbb685fef81ed4bb99425bae3564cb89df10 (patch)
tree0de5bfdff4c40246b30409568cd0c3fdbaca596a /etc/security
parent25ff7daa478e7a7e3b0e00950b45762198a68687 (diff)
downloadFreeBSD-src-599cdbb685fef81ed4bb99425bae3564cb89df10.zip
FreeBSD-src-599cdbb685fef81ed4bb99425bae3564cb89df10.tar.gz
Use -X to be xargs-friendly
Check devices too, follow original BSD intention Find only executable files with s-bits, close PR bin/1022 Reset locale to C to have equal results in any case
Diffstat (limited to 'etc/security')
-rw-r--r--etc/security14
1 files changed, 11 insertions, 3 deletions
diff --git a/etc/security b/etc/security
index b5cdfd4..5213747 100644
--- a/etc/security
+++ b/etc/security
@@ -1,9 +1,10 @@
#!/bin/sh -
#
# @(#)security 5.3 (Berkeley) 5/28/91
-# $Id: security,v 1.8 1995/05/27 01:37:44 ache Exp $
+# $Id: security,v 1.9 1995/09/15 00:22:31 ache Exp $
#
PATH=/sbin:/bin:/usr/bin
+LC_ALL=C; export LC_ALL
host=`hostname -s`
echo "Subject: $host security check output"
@@ -24,8 +25,15 @@ set $MP
while test $# -ge 1; do
mount=$1
shift
- find $mount -xdev \( -perm -u+s -or -perm -g+s \) | sort
-done | xargs -n 20 ls -lgTd > $TMP
+ find -X $mount -xdev -type f \
+ \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \
+ \( -perm -u+s -or -perm -g+s \) -or \
+ \( -type c -or -type b \) \
+ | sort
+# exclude date/time info for devices
+done | xargs -n 20 ls -lgTd | expand | \
+ sed 's/\(^[cb].*, *[0-9x]*\).*\( \/.*\)$/\1\2/' \
+> $TMP
if [ ! -f $LOG/setuid.today ] ; then
echo "no $LOG/setuid.today"
OpenPOWER on IntegriCloud