aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/portbuild
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>2000-08-29 16:22:39 +0800
committerasami <asami@FreeBSD.org>2000-08-29 16:22:39 +0800
commit3d33dca66d865f7950e2720629b84cd7f150a596 (patch)
tree2ea53fa5c4d5540af865f2de09f330afb5b3f698 /Tools/portbuild
parent2cdcab31f561423ec65c857f9fbe3758a42ced12 (diff)
downloadfreebsd-ports-gnome-3d33dca66d865f7950e2720629b84cd7f150a596.tar.gz
freebsd-ports-gnome-3d33dca66d865f7950e2720629b84cd7f150a596.tar.zst
freebsd-ports-gnome-3d33dca66d865f7950e2720629b84cd7f150a596.zip
Change find command line to find potential security hazards (ports
that install setupd binaries etc.) Submitted by: kris
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-xTools/portbuild/scripts/buildscript4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/portbuild/scripts/buildscript b/Tools/portbuild/scripts/buildscript
index ac1026de45da..a38f59871d46 100755
--- a/Tools/portbuild/scripts/buildscript
+++ b/Tools/portbuild/scripts/buildscript
@@ -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"