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

2007-03-08 Thread Bruce Evans
On Wed, 7 Mar 2007, Tim Kientzle wrote: Tim Kientzle wrote: ... GNU tar(1) implied the -p option for root, but BSD tar(1) doesn't do that. Ah. Here we are: contrib/tar/src/extract.c, revision 1.2 (07-Jun-2002) by sobomax +#ifndef __FreeBSD__ same_permissions_option += we_are_root; same

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

2007-03-07 Thread Tim Kientzle
Tim Kientzle wrote: ... GNU tar(1) implied the -p option for root, but BSD tar(1) doesn't do that. Ah. Here we are: contrib/tar/src/extract.c, revision 1.2 (07-Jun-2002) by sobomax +#ifndef __FreeBSD__ same_permissions_option += we_are_root; same_owner_option += we_are_root; +#endif T

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

2007-03-07 Thread Tim Kientzle
... 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. Now I'm confused. Why were you surprised by this? According to some notes I hav

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

2007-03-07 Thread Tim Kientzle
... GNU tar(1) implied the -p option for root, but BSD tar(1) doesn't do that. 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' You probably wanted this instead: : `--pr

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

2007-03-07 Thread Tim Kientzle
Jim Rees wrote: I'm not convinced this fix is correct. I don't think tar ever did this before gnu came along, You're dating yourself here, Jim. GNU tar is over 20 years old. ;-) I also thought gnu tar shipped with FreeBSD 1.0 in 1993, though I might be wrong about that. ... and I would fi

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

2007-03-07 Thread Jim Rees
I'm not convinced this fix is correct. I don't think tar ever did this before gnu came along, and I would find it surprising to have this option turned on just because I'm root. And if you enable it automatically for root, now you need another option to turn it off. __

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

2007-03-07 Thread Ruslan Ermilov
On Wed, Mar 07, 2007 at 05:15:08PM +1100, Bruce Evans wrote: > 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. > >>>

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

2007-03-06 Thread Bruce Evans
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 c

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

2007-03-06 Thread Tim Kientzle
... 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.

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

2007-03-06 Thread Greg 'groggy' Lehey
On Tuesday, 6 March 2007 at 23:43:07 +0300, Ruslan Ermilov wrote: > On Tue, Mar 06, 2007 at 09:41:54AM -0800, Tim Kientzle wrote: >> Ruslan Ermilov wrote: >>> Modified files: >>>usr.sbin/pkg_install/lib url.c >>> Log: >>> Invoke tar(1) with the -p option when installing a package >>> from

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

2007-03-06 Thread Ruslan Ermilov
On Tue, Mar 06, 2007 at 09:41:54AM -0800, Tim Kientzle wrote: > Ruslan Ermilov wrote: > > Modified files: > >usr.sbin/pkg_install/lib url.c > > Log: > > Invoke tar(1) with the -p option when installing a package > > from an URL (i.e., do it the same way as when installing > > from a file)

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

2007-03-06 Thread Tim Kientzle
Ruslan Ermilov wrote: Modified files: usr.sbin/pkg_install/lib url.c Log: Invoke tar(1) with the -p option when installing a package from an URL (i.e., do it the same way as when installing from a file). This fixes the lossage of the setuid bits. It wasn't a problem before beca