diff options
author | 2014-09-01 11:29:15 +0000 | |
---|---|---|
committer | 2014-09-01 11:29:15 +0000 | |
commit | 03d25a10dfcd3f3a004680b1adc9e92d531be7c1 (patch) | |
tree | 060b68e4ca9b61cdb3c29d5469cacc33bcd80884 | |
parent | be a wee bit more paranoid about file sizes. (diff) | |
download | wireguard-openbsd-03d25a10dfcd3f3a004680b1adc9e92d531be7c1.tar.xz wireguard-openbsd-03d25a10dfcd3f3a004680b1adc9e92d531be7c1.zip |
@newuser and @newgroup won't necessarily be on the machine during pkg_create,
so fake uid/gid 0 if they're not. (removes some warning message)
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Ustar.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Ustar.pm b/usr.sbin/pkg_add/OpenBSD/Ustar.pm index f0641891859..e4e4680713b 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.83 2014/08/10 10:04:39 espie Exp $ +# $OpenBSD: Ustar.pm,v 1.84 2014/09/01 11:29:15 espie Exp $ # # Copyright (c) 2002-2014 Marc Espie <espie@openbsd.org> # @@ -310,8 +310,8 @@ sub pack_header $header = pack(USTAR_HEADER, $name, sprintf("%07o", $entry->{mode}), - sprintf("%07o", $entry->{uid}), - sprintf("%07o", $entry->{gid}), + sprintf("%07o", $entry->{uid} // 0), + sprintf("%07o", $entry->{gid} // 0), sprintf("%011o", $size), sprintf("%011o", $entry->{mtime} // 0), $cksum, |