summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/Ustar.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2014-01-13 18:42:35 +0000
committerMarc Espie <espie@cvs.openbsd.org>2014-01-13 18:42:35 +0000
commit6b961f11c9a60fa48dc4074997623a25b200dd95 (patch)
treed9e88088ef11b4611f6b502e3ba88e8096acd83c /usr.sbin/pkg_add/OpenBSD/Ustar.pm
parent8a6e2750f504a898825a2e2b6647f44526f55960 (diff)
have Ustar extract owners for symlinks, which isn't really important for
pkg_add, since it skips links and restores owners from the plist anyways.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Ustar.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Ustar.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Ustar.pm b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
index d3e7ab2fcea..f95ce49dde6 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.75 2014/01/09 20:20:01 espie Exp $
+# $OpenBSD: Ustar.pm,v 1.76 2014/01/13 18:42:34 espie Exp $
#
# Copyright (c) 2002-2014 Marc Espie <espie@openbsd.org>
#
@@ -559,6 +559,8 @@ sub create
symlink $self->{linkname}, $self->{destdir}.$self->name or
$self->fatal("Can't symlink #1 to #2#3: #4",
$self->{linkname}, $self->{destdir}, $self->name, $!);
+ require POSIX;
+ POSIX::lchown($self->{uid}, $self->{gid}, $self->{destdir}.$self->name);
}
sub isLink() { 1 }