From: espie Date: Mon, 13 Jan 2014 18:42:34 +0000 (+0000) Subject: have Ustar extract owners for symlinks, which isn't really important for X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5bbd7c0319ac65cfe914e7b5795b4c2166dd0082;p=openbsd 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. --- 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 # @@ -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 }