Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-16 Thread Mateusz Marzantowicz
On 15.07.2013 19:35, Chris Adams wrote: > Once upon a time, Richard W.M. Jones said: >> Why? > http://docs.fedoraproject.org/en-US/Fedora/19/html/Release_Notes/sect-Release_Notes-Changes_for_Sysadmin.html#idm263811933136 > There is a BUG it the documentation or in my Fedora 19 system! This lines

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-16 Thread Richard W.M. Jones
On Tue, Jul 16, 2013 at 01:37:33PM -0400, Colin Walters wrote: > But ok, so as you said in the followup, the real root issue here is > libvirt calling chown [on the kernel and initrd]. It's not clear > to me why it does so. It's a good question, and trying to formulate an answer made me question

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-16 Thread Colin Walters
On Tue, 2013-07-16 at 17:59 +0100, Richard W.M. Jones wrote: > There's a lock (building_lock) which stops two threads from the same > process from entering the appliance building code in parallel. > > There's also a lock (fcntl held on the file 'checksums') which stops > two processes owned by the

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-16 Thread Richard W.M. Jones
On Tue, Jul 16, 2013 at 05:42:00PM +0100, Richard W.M. Jones wrote: > On Tue, Jul 16, 2013 at 11:50:10AM -0400, Colin Walters wrote: > > On Tue, 2013-07-16 at 15:59 +0100, Richard W.M. Jones wrote: > > > I'm not even sure > > > how to do that because we want the atomic behaviour of hard links, and

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-16 Thread Richard W.M. Jones
On Tue, Jul 16, 2013 at 11:50:10AM -0400, Colin Walters wrote: > On Tue, 2013-07-16 at 15:59 +0100, Richard W.M. Jones wrote: > > I'm not even sure > > how to do that because we want the atomic behaviour of hard links, and > > we want to have qemu running as a different user (for security, oh the

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-16 Thread Colin Walters
On Tue, 2013-07-16 at 15:59 +0100, Richard W.M. Jones wrote: > I'm not even sure > how to do that because we want the atomic behaviour of hard links, and > we want to have qemu running as a different user (for security, oh the > irony), so there's no other obvious way to code it. Can you link to

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-16 Thread Richard W.M. Jones
On Tue, Jul 16, 2013 at 01:07:40PM +0100, Bryn M. Reeves wrote: > On 07/16/2013 12:41 PM, Colin Walters wrote: > > On Tue, 2013-07-16 at 10:42 +0100, Richard W.M. Jones wrote: > > > >> FWIW this change caused a segfault in OpenStack > > > > This phrase is very dramatic. I'd say "triggered a dou

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-16 Thread Bryn M. Reeves
On 07/16/2013 12:41 PM, Colin Walters wrote: > On Tue, 2013-07-16 at 10:42 +0100, Richard W.M. Jones wrote: > >> FWIW this change caused a segfault in OpenStack > > This phrase is very dramatic. I'd say "triggered a double free in an > untested libguestfs error path" is more accurate and less d

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-16 Thread Colin Walters
On Tue, 2013-07-16 at 10:42 +0100, Richard W.M. Jones wrote: > FWIW this change caused a segfault in OpenStack This phrase is very dramatic. I'd say "triggered a double free in an untested libguestfs error path" is more accurate and less dramatic. Really it had nothing to do with hard links at

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-16 Thread Richard W.M. Jones
On Tue, Jul 16, 2013 at 10:42:10AM +0200, Florian Weimer wrote: > On 07/15/2013 07:32 PM, Richard W.M. Jones wrote: > > >Why? > > Without it, it's possible to exploit certain weaknesses to make > /etc/shadow word-readable or worse, for example. > > Hard links are fundamentally incompatible with

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-16 Thread Florian Weimer
On 07/15/2013 07:32 PM, Richard W.M. Jones wrote: Why? Without it, it's possible to exploit certain weaknesses to make /etc/shadow word-readable or worse, for example. Hard links are fundamentally incompatible with the way we run SELinux, and this change mitigates that issue to some extent

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-15 Thread Richard W.M. Jones
On Mon, Jul 15, 2013 at 12:35:58PM -0500, Chris Adams wrote: > Once upon a time, Richard W.M. Jones said: > > Why? > > http://docs.fedoraproject.org/en-US/Fedora/19/html/Release_Notes/sect-Release_Notes-Changes_for_Sysadmin.html#idm263811933136 The description there ["follows a link belonging to

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-15 Thread Richard W.M. Jones
On Mon, Jul 15, 2013 at 06:32:50PM +0100, Richard W.M. Jones wrote: > > On Fedora 18 (and every Unix since forever): > > $ touch foo > $ sudo chown root.root foo > $ ln foo bar > > On Fedora 19 & Rawhide: > > $ touch foo > $ sudo chown root.root foo > $ ln foo bar > ln: failed to create hard li

Re: Hard link to root-owned file now fails (since Fedora 19)

2013-07-15 Thread Chris Adams
Once upon a time, Richard W.M. Jones said: > Why? http://docs.fedoraproject.org/en-US/Fedora/19/html/Release_Notes/sect-Release_Notes-Changes_for_Sysadmin.html#idm263811933136 -- Chris Adams -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/d

Hard link to root-owned file now fails (since Fedora 19)

2013-07-15 Thread Richard W.M. Jones
On Fedora 18 (and every Unix since forever): $ touch foo $ sudo chown root.root foo $ ln foo bar On Fedora 19 & Rawhide: $ touch foo $ sudo chown root.root foo $ ln foo bar ln: failed to create hard link ‘bar’ => ‘foo’: Operation not permitted Why? Rich. -- Richard Jones, Virtualization Gro