diff options
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Add.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm index 8450ed3f3e3..431736cbb8f 100644 --- a/usr.sbin/pkg_add/OpenBSD/Add.pm +++ b/usr.sbin/pkg_add/OpenBSD/Add.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Add.pm,v 1.48 2006/02/16 11:21:58 espie Exp $ +# $OpenBSD: Add.pm,v 1.49 2006/12/05 14:04:19 steven Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -140,7 +140,12 @@ sub set_modes $uidcache = OpenBSD::UidCache->new(); $gidcache = OpenBSD::GidCache->new(); } - my ($uid, $gid) = (stat $name)[4,5]; + my ($uid, $gid); + if (-l $name) { + ($uid, $gid) = (lstat $name)[4,5]; + } else { + ($uid, $gid) = (stat $name)[4,5]; + } if (defined $self->{owner}) { $uid = $uidcache->lookup($self->{owner}, $uid); } |