1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-06 11:41:52 +00:00

Change find command line to find potential security hazards (ports

that install setupd binaries etc.)

Submitted by:	kris
This commit is contained in:
Satoshi Asami 2000-08-29 08:22:39 +00:00
parent 04694e8990
commit c867f8186d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=32086

View File

@ -59,10 +59,10 @@ else
mtreefile=$(make -V MTREE_FILE)
echo "================================================================"
echo "checking installed files"
find ${prefix} -perm -2000 -o -perm -4000 -o -perm -0002 -ls | sort > /tmp/list1
find ${prefix} \( \( -perm -4000 -o -perm -2000 -a \! -type d \) -o \( -perm -0002 -o -perm -0020 \) \) -a \! -type l -ls | sort > /tmp/list1
echo "pkg_delete ${pkgname}"
pkg_delete ${pkgname}
find ${prefix} -perm -2000 -o -perm -4000 -o -perm -0002 -ls | sort > /tmp/list2
find ${prefix} \( \( -perm -4000 -o -perm -2000 -a \! -type d \) -o \( -perm -0002 -o -perm -0020 \) \) -a \! -type l -ls | sort > /tmp/list2
if ! diff -qb /tmp/list1 /tmp/list2 2>/dev/null; then
echo "================================================================"
echo "found set[ug]id or world-writable files and directories"