cvs commit: src/usr.sbin/pkg_install/lib url.c

Bruce Evans bde at zeta.org.au
Wed Mar 7 06:15:13 UTC 2007


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


More information about the cvs-src mailing list