From owner-cvs-all@FreeBSD.ORG Wed Mar 7 11:21:10 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 9C2BB16A401; Wed, 7 Mar 2007 11:21:10 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.freebsd.org (Postfix) with ESMTP id 4AC6D13C428; Wed, 7 Mar 2007 11:21:10 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 4FBA15EC7; Wed, 7 Mar 2007 14:21:09 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 2D6CB5E3A; Wed, 7 Mar 2007 14:21:09 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id l27BHjXd014456; Wed, 7 Mar 2007 14:17:45 +0300 (MSK) (envelope-from ru) Date: Wed, 7 Mar 2007 14:17:45 +0300 From: Ruslan Ermilov To: Bruce Evans Message-ID: <20070307111745.GB14172@rambler-co.ru> References: <200703061454.l26Esj7D043245@repoman.freebsd.org> <45EDA7E2.4040300@freebsd.org> <20070306204307.GD43608@rambler-co.ru> <20070306231228.GC68567@wantadilla.lemis.com> <45EE3BC4.8070309@freebsd.org> <20070307171432.B28541@delplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PmA2V3Z32TCmWXqI" Content-Disposition: inline In-Reply-To: <20070307171432.B28541@delplex.bde.org> User-Agent: Mutt/1.5.14 (2007-02-12) X-Virus-Scanned: No virus found Cc: Greg 'groggy' Lehey , cvs-src@FreeBSD.org, Tim Kientzle , cvs-all@FreeBSD.org, src-committers@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 11:21:10 -0000 --PmA2V3Z32TCmWXqI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 07, 2007 at 05:15:08PM +1100, Bruce Evans wrote: > On Tue, 6 Mar 2007, Tim Kientzle wrote: >=20 > >>>>>... 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? >=20 > >From tar.info: >=20 > %%% > `--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. > %%% >=20 You probably wanted this instead: : `--preserve-permissions' : `--same-permissions' : `-p' : When `tar' is extracting an archive, it normally subtracts the : users' umask from the permissions specified in the archive and : uses that number as the permissions to create the destination : file. Specifying this option instructs `tar' that it should use : the permissions directly from the archive. *Note Writing::. :=20 : `--no-same-permissions' : When extracting an archive, subtract the user's umask from files : from the permissions specified in the archive. This is the : default behavior for ordinary users; this option has an effect : only for the superuser. It doesn't say it explicitly that -p is the default option for root, nowehre, but you can guess it from reading the last sentence. ;) Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --PmA2V3Z32TCmWXqI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.2 (FreeBSD) iD8DBQFF7p9ZqRfpzJluFF4RAgoQAJ9o6jBD8z48YZEq+CL1WOGooFudywCffK7Z h2dF0JBNfGiq1fYWBuFExBI= =voF6 -----END PGP SIGNATURE----- --PmA2V3Z32TCmWXqI--