diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-25 22:32:48 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-25 22:32:48 +0000 |
commit | d7385fc81fcd93b223c4b499d702324af9298c7f (patch) | |
tree | 43dabc6ef204ec919a051aca7e41f98bb7bfe2c7 /usr.sbin | |
parent | 47af8d49b45fed725016b1bb9e631b8a7c308a9a (diff) |
until people finally fix their @group issues in packages, at least refuse
flat-out to write packages with no @group annotations on fishy stuff
(writable directories, setuid/setgid stuff)
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/ArcCheck.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm index 92f37184365..42b64d7fc5f 100644 --- a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm +++ b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: ArcCheck.pm,v 1.7 2007/05/25 12:19:24 espie Exp $ +# $OpenBSD: ArcCheck.pm,v 1.8 2007/05/25 22:32:47 espie Exp $ # # Copyright (c) 2005-2006 Marc Espie <espie@openbsd.org> # @@ -71,8 +71,16 @@ sub verify_modes } if (!defined $item->{group} && !$o->isSymLink) { if ($o->{gname} ne 'bin' && $o->{gname} ne 'wheel') { + if (($o->{mode} & (S_ISUID | S_ISGID | S_IWGRP)) != 0) { + print STDERR "Error: no \@group for ", + $item->fullname, " (", $o->{uname}, + "), which has mode ", + sprintf("%4o", $o->{mode} & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID)), "\n"; + $result = 0; + } else { print STDERR "Warning: no \@group for ", $item->fullname, " (", $o->{gname}, ")\n"; + } } } if (!defined $item->{mode} && $o->isFile) { |