summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2005-09-20 20:06:49 +0000
committerMarc Espie <espie@cvs.openbsd.org>2005-09-20 20:06:49 +0000
commite062677945b4e2867fe7f93669a8a26d3659531e (patch)
tree389cdb4db9e449f107c68fe7b76e91d5f3e7ef9b
parent6ceef5908931a16ff5508efcee87df22190db0d1 (diff)
refuse building archive if we don't have user names for the uids.
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Ustar.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Ustar.pm b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
index 26a89209bec..0a7a4b3a3a2 100644
--- a/usr.sbin/pkg_add/OpenBSD/Ustar.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Ustar.pm,v 1.36 2005/09/13 09:30:55 espie Exp $
+# $OpenBSD: Ustar.pm,v 1.37 2005/09/20 20:06:48 espie Exp $
#
# Copyright (c) 2002-2004 Marc Espie <espie@openbsd.org>
#
@@ -217,9 +217,15 @@ sub mkheader
if (length $linkname > MAXLINKNAME) {
die "Linkname too long $linkname\n";
}
+ if (!defined $entry->{uname}) {
+ die "No user name for ", $entry->{name}, " (uid ", $entry->{uid}, ")\n";
+ }
if (length $entry->{uname} > MAXUSERNAME) {
die "Username too long ", $entry->{uname}, "\n";
}
+ if (!defined $entry->{gname}) {
+ die "No group name for ", $entry->{name}, " (gid ", $entry->{gid}. "\n";
+ }
if (length $entry->{gname} > MAXGROUPNAME) {
die "Groupname too long ", $entry->{gname}, "\n";
}