Date: Wed, 7 Mar 2007 17:15:08 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Tim Kientzle <kientzle@FreeBSD.org> Cc: Greg 'groggy' Lehey <grog@FreeBSD.org>, cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Ruslan Ermilov <ru@FreeBSD.org>, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/pkg_install/lib url.c Message-ID: <20070307171432.B28541@delplex.bde.org> In-Reply-To: <45EE3BC4.8070309@freebsd.org> References: <200703061454.l26Esj7D043245@repoman.freebsd.org> <45EDA7E2.4040300@freebsd.org> <20070306204307.GD43608@rambler-co.ru> <20070306231228.GC68567@wantadilla.lemis.com> <45EE3BC4.8070309@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 6 Mar 2007, Tim Kientzle wrote: >>>>> ... GNU tar(1) implied the >>>>> -p option for root, but BSD tar(1) doesn't do that. >>>> >>>> Hmmm... This might actually be considered a bsdtar bug. >>>> I'll look into it. >>> >>> That behavior of BSD tar(1) surprised me, to be honest. > > It's a trivial fix; there's already a check for whether > tar is being run by root. If so, it sets _EXTRACT_OWNER > to restore the owner. I just need to fill in the flags > associated with -p as well. > > One problem that I don't see documented in any GNU tar > docs I can find: Is there a way to suppress this behavior > for root in GNU tar? >From tar.info: %%% `--no-same-owner' Do not attempt to restore ownership when extracting. This is the default behavior for ordinary users, so this option has an effect only for the superuser. %%% Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070307171432.B28541>