From owner-cvs-all@FreeBSD.ORG Wed Mar 7 06:15:13 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A3F3B16A401; Wed, 7 Mar 2007 06:15:13 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2-3.pacific.net.au [61.8.2.226]) by mx1.freebsd.org (Postfix) with ESMTP id 68D6313C4B2; Wed, 7 Mar 2007 06:15:13 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 2B2D8119091; Wed, 7 Mar 2007 17:15:08 +1100 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id AF3A08C07; Wed, 7 Mar 2007 17:15:10 +1100 (EST) Date: Wed, 7 Mar 2007 17:15:08 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Tim Kientzle In-Reply-To: <45EE3BC4.8070309@freebsd.org> Message-ID: <20070307171432.B28541@delplex.bde.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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Greg 'groggy' Lehey , cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Ruslan Ermilov , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/pkg_install/lib url.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2007 06:15:13 -0000 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