totally forgot about the !uid notation in newuser when adding the early
authorespie <espie@openbsd.org>
Mon, 20 Apr 2015 13:10:54 +0000 (13:10 +0000)
committerespie <espie@openbsd.org>
Mon, 20 Apr 2015 13:10:54 +0000 (13:10 +0000)
cache for pkg_create. Reminded by sthen@

usr.sbin/pkg_add/OpenBSD/PackingElement.pm

index 37008e1..e637383 100644 (file)
@@ -1,5 +1,5 @@
 # ex:ts=8 sw=4:
-# $OpenBSD: PackingElement.pm,v 1.241 2015/04/16 13:29:16 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.242 2015/04/20 13:10:54 espie Exp $
 #
 # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
 #
@@ -1145,7 +1145,9 @@ sub new
 sub destate
 {
        my ($self, $state) = @_;
-       $state->{owners}{$self->{name}} = $self->{uid};
+       my $uid = $self->{uid};
+       $uid =~ s/^\!//;
+       $state->{owners}{$self->{name}} = $uid;
 }
 
 sub check
@@ -1206,7 +1208,9 @@ sub new
 sub destate
 {
        my ($self, $state) = @_;
-       $state->{groups}{$self->{name}} = $self->{gid};
+       my $gid = $self->{gid};
+       $gid =~ s/^\!//;
+       $state->{groups}{$self->{name}} = $gid;
 }
 
 sub check