Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-19 Thread Miklos Szeredi
> Checking the permissions on the mountpoint to allow unmounting is > > - rather inelegant: user can't see those permissions, can only > determine if umount is allowed by trial and error > > - may be a security hole, e.g.: > > sysadmin: > > mkdir -m 777 /mnt/disk >

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-19 Thread Miklos Szeredi
> > > As I said earlier, I see a case where two mounts that are peers of each > > > other can become un-identical if we dont propagate the "allowusermnt". > > > > > > As a practical example. > > > > > > /tmp and /mnt are peers of each other. > > > /tmp has its "allowusermnt" flag set, which has

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-19 Thread Miklos Szeredi
As I said earlier, I see a case where two mounts that are peers of each other can become un-identical if we dont propagate the allowusermnt. As a practical example. /tmp and /mnt are peers of each other. /tmp has its allowusermnt flag set, which has not been propagated to

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-19 Thread Miklos Szeredi
Checking the permissions on the mountpoint to allow unmounting is - rather inelegant: user can't see those permissions, can only determine if umount is allowed by trial and error - may be a security hole, e.g.: sysadmin: mkdir -m 777 /mnt/disk mount

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-18 Thread Ram Pai
On Wed, 2007-04-18 at 21:14 +0200, Miklos Szeredi wrote: > > As I said earlier, I see a case where two mounts that are peers of each > > other can become un-identical if we dont propagate the "allowusermnt". > > > > As a practical example. > > > > /tmp and /mnt are peers of each other. > > /tmp

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-18 Thread Trond Myklebust
On Wed, 2007-04-18 at 16:01 +0100, Christoph Hellwig wrote: > I suspect the right answer here is to make nfs mount handling smarter. > The way mounting works the filesystem is allowed to choose whether it > can re-used a superblock or needs a new one. In the NFS case we probably > want to allow

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-18 Thread Ram Pai
On Wed, 2007-04-18 at 11:19 +0200, Miklos Szeredi wrote: > > > Allowing this and other flags to NOT be propagated just makes it > > > possible to have a set of shared mounts with asymmetric properties, > > > which may actually be desirable. > > > > The shared mount feature was designed to ensure

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-18 Thread Miklos Szeredi
> >> > I've tried to make this unprivileged mount thing as simple as > >> > possible, and no simpler. If we can make it even simpler, all the > >> > better. > >> > >> We are certainly much more complex then the code in plan9 (just > >> read through it) so I think we have room for improvement. >

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-18 Thread Eric W. Biederman
Miklos Szeredi <[EMAIL PROTECTED]> writes: >> > I've tried to make this unprivileged mount thing as simple as >> > possible, and no simpler. If we can make it even simpler, all the >> > better. >> >> We are certainly much more complex then the code in plan9 (just >> read through it) so I think

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-18 Thread Miklos Szeredi
> > > Don't forget that almost all mount flags are per-superblock. How are you > > > planning on dealing with the case that one user mounts a filesystem > > > read-only, while another is trying to mount the same one read-write? > > > > Yeah, I forgot, the per-mount read-only patches are not yet

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-18 Thread Christoph Hellwig
On Wed, Apr 18, 2007 at 10:26:29AM -0400, Trond Myklebust wrote: > > That doesn't really change my agrument though. _If_ the flag is per > > mount, then it makes sense to be able to change it on a master and not > > on a slave. If mount flags are propagated, this is not possible. > > Read-only

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-18 Thread Trond Myklebust
On Wed, 2007-04-18 at 16:03 +0200, Miklos Szeredi wrote: > > Don't forget that almost all mount flags are per-superblock. How are you > > planning on dealing with the case that one user mounts a filesystem > > read-only, while another is trying to mount the same one read-write? > > Yeah, I

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-18 Thread Miklos Szeredi
> > > > I've tried to make this unprivileged mount thing as simple as > > > > possible, and no simpler. If we can make it even simpler, all the > > > > better. > > > > > > We are certainly much more complex then the code in plan9 (just > > > read through it) so I think we have room for

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-18 Thread Trond Myklebust
On Wed, 2007-04-18 at 11:11 +0200, Miklos Szeredi wrote: > > > I've tried to make this unprivileged mount thing as simple as > > > possible, and no simpler. If we can make it even simpler, all the > > > better. > > > > We are certainly much more complex then the code in plan9 (just > > read

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-18 Thread Miklos Szeredi
> > Allowing this and other flags to NOT be propagated just makes it > > possible to have a set of shared mounts with asymmetric properties, > > which may actually be desirable. > > The shared mount feature was designed to ensure that the mount remained > identical at all the locations. OK, so

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-18 Thread Miklos Szeredi
> > I've tried to make this unprivileged mount thing as simple as > > possible, and no simpler. If we can make it even simpler, all the > > better. > > We are certainly much more complex then the code in plan9 (just > read through it) so I think we have room for improvement. > > Just for

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-18 Thread Miklos Szeredi
I've tried to make this unprivileged mount thing as simple as possible, and no simpler. If we can make it even simpler, all the better. We are certainly much more complex then the code in plan9 (just read through it) so I think we have room for improvement. Just for reference what I

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-18 Thread Miklos Szeredi
Allowing this and other flags to NOT be propagated just makes it possible to have a set of shared mounts with asymmetric properties, which may actually be desirable. The shared mount feature was designed to ensure that the mount remained identical at all the locations. OK, so remount

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-18 Thread Trond Myklebust
On Wed, 2007-04-18 at 11:11 +0200, Miklos Szeredi wrote: I've tried to make this unprivileged mount thing as simple as possible, and no simpler. If we can make it even simpler, all the better. We are certainly much more complex then the code in plan9 (just read through it) so I

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-18 Thread Miklos Szeredi
I've tried to make this unprivileged mount thing as simple as possible, and no simpler. If we can make it even simpler, all the better. We are certainly much more complex then the code in plan9 (just read through it) so I think we have room for improvement. Just for

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-18 Thread Trond Myklebust
On Wed, 2007-04-18 at 16:03 +0200, Miklos Szeredi wrote: Don't forget that almost all mount flags are per-superblock. How are you planning on dealing with the case that one user mounts a filesystem read-only, while another is trying to mount the same one read-write? Yeah, I forgot, the

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-18 Thread Christoph Hellwig
On Wed, Apr 18, 2007 at 10:26:29AM -0400, Trond Myklebust wrote: That doesn't really change my agrument though. _If_ the flag is per mount, then it makes sense to be able to change it on a master and not on a slave. If mount flags are propagated, this is not possible. Read-only isn't

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-18 Thread Miklos Szeredi
Don't forget that almost all mount flags are per-superblock. How are you planning on dealing with the case that one user mounts a filesystem read-only, while another is trying to mount the same one read-write? Yeah, I forgot, the per-mount read-only patches are not yet in. That

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-18 Thread Eric W. Biederman
Miklos Szeredi [EMAIL PROTECTED] writes: I've tried to make this unprivileged mount thing as simple as possible, and no simpler. If we can make it even simpler, all the better. We are certainly much more complex then the code in plan9 (just read through it) so I think we have room for

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-18 Thread Miklos Szeredi
I've tried to make this unprivileged mount thing as simple as possible, and no simpler. If we can make it even simpler, all the better. We are certainly much more complex then the code in plan9 (just read through it) so I think we have room for improvement. Just for reference

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-18 Thread Ram Pai
On Wed, 2007-04-18 at 11:19 +0200, Miklos Szeredi wrote: Allowing this and other flags to NOT be propagated just makes it possible to have a set of shared mounts with asymmetric properties, which may actually be desirable. The shared mount feature was designed to ensure that the

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-18 Thread Trond Myklebust
On Wed, 2007-04-18 at 16:01 +0100, Christoph Hellwig wrote: I suspect the right answer here is to make nfs mount handling smarter. The way mounting works the filesystem is allowed to choose whether it can re-used a superblock or needs a new one. In the NFS case we probably want to allow

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-18 Thread Ram Pai
On Wed, 2007-04-18 at 21:14 +0200, Miklos Szeredi wrote: As I said earlier, I see a case where two mounts that are peers of each other can become un-identical if we dont propagate the allowusermnt. As a practical example. /tmp and /mnt are peers of each other. /tmp has its

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Ram Pai
On Tue, 2007-04-17 at 21:43 +0200, Miklos Szeredi wrote: > > > > I'm a bit lost about what is currently done and who advocates for what. > > > > > > > > It seems to me the MNT_ALLOWUSERMNT (or whatever :) flag should be > > > > propagated. In the /share rbind+chroot example, I assume the admin >

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Eric W. Biederman
Miklos Szeredi <[EMAIL PROTECTED]> writes: >> > I'm still not sure, what your problem is. >> >> My problem right now is that I see a serious complexity escalation in >> the user interface that we must support indefinitely. >> >> I see us taking a nice powerful concept and seriously watering it

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Miklos Szeredi
> > > I'm a bit lost about what is currently done and who advocates for what. > > > > > > It seems to me the MNT_ALLOWUSERMNT (or whatever :) flag should be > > > propagated. In the /share rbind+chroot example, I assume the admin > > > would start by doing > > > > > > mount --bind /share

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Ram Pai
On Tue, 2007-04-17 at 19:44 +0200, Miklos Szeredi wrote: > > I'm a bit lost about what is currently done and who advocates for what. > > > > It seems to me the MNT_ALLOWUSERMNT (or whatever :) flag should be > > propagated. In the /share rbind+chroot example, I assume the admin > > would start

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Miklos Szeredi
> > mount --make-rshared / > > mkdir -p /mnt/ns/$USER > > mount --rbind / /mnt/ns/$USER > > mount --make-rslave /mnt/ns/$USER > > This was my main point - that the tree in which users can mount will be > a slave of /, so that propagating the "are user mounts allowed" flag > among peers is safe

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Miklos Szeredi
> > I'm still not sure, what your problem is. > > My problem right now is that I see a serious complexity escalation in > the user interface that we must support indefinitely. > > I see us taking a nice powerful concept and seriously watering it down. > To some extent we have to avoid confusing

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Eric W. Biederman
Miklos Szeredi <[EMAIL PROTECTED]> writes: > I'm still not sure, what your problem is. My problem right now is that I see a serious complexity escalation in the user interface that we must support indefinitely. I see us taking a nice powerful concept and seriously watering it down. To some

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): > > I'm a bit lost about what is currently done and who advocates for what. > > > > It seems to me the MNT_ALLOWUSERMNT (or whatever :) flag should be > > propagated. In the /share rbind+chroot example, I assume the admin > > would start by doing > >

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Miklos Szeredi
> I'm a bit lost about what is currently done and who advocates for what. > > It seems to me the MNT_ALLOWUSERMNT (or whatever :) flag should be > propagated. In the /share rbind+chroot example, I assume the admin > would start by doing > > mount --bind /share /share > mount

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): > > > > > > Also for bind-mount and remount operations the flag has to be > > > > > > propagated > > > > > > down its propagation tree. Otherwise a unpriviledged mount in a > > > > > > shared > > > > > > mount wont get reflected in its peers and

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): > "Serge E. Hallyn" <[EMAIL PROTECTED]> writes: > >> > >> Why are directory permissions not sufficient to allow/deny non-priveleged > > mounts? > >> I don't understand that contention yet. > > > > The same scenarios laid out previously in this

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): > "Serge E. Hallyn" <[EMAIL PROTECTED]> writes: > >> > >> Why are directory permissions not sufficient to allow/deny non-priveleged > > mounts? > >> I don't understand that contention yet. > > > > The same scenarios laid out previously in this

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Miklos Szeredi
> Interesting > > So far even today these things can happen, however they are sufficiently > unlikely the tools don't account for them. > > Once a hostile user can cause them things are more of a problem. > > > (Unless you want to tackle each problem legacy tool one at a time to > > remove

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-17 Thread Eric W. Biederman
"Serge E. Hallyn" <[EMAIL PROTECTED]> writes: >> >> Why are directory permissions not sufficient to allow/deny non-priveleged > mounts? >> I don't understand that contention yet. > > The same scenarios laid out previously in this thread. I.e. > > 1. user hallyn does mount --bind /

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Eric W. Biederman
Serge E. Hallyn [EMAIL PROTECTED] writes: Why are directory permissions not sufficient to allow/deny non-priveleged mounts? I don't understand that contention yet. The same scenarios laid out previously in this thread. I.e. 1. user hallyn does mount --bind / /home/hallyn/root 2. (...)

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Miklos Szeredi
Interesting So far even today these things can happen, however they are sufficiently unlikely the tools don't account for them. Once a hostile user can cause them things are more of a problem. (Unless you want to tackle each problem legacy tool one at a time to remove problems -

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): Serge E. Hallyn [EMAIL PROTECTED] writes: Why are directory permissions not sufficient to allow/deny non-priveleged mounts? I don't understand that contention yet. The same scenarios laid out previously in this thread. I.e. 1. user

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): Serge E. Hallyn [EMAIL PROTECTED] writes: Why are directory permissions not sufficient to allow/deny non-priveleged mounts? I don't understand that contention yet. The same scenarios laid out previously in this thread. I.e. 1. user

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): Also for bind-mount and remount operations the flag has to be propagated down its propagation tree. Otherwise a unpriviledged mount in a shared mount wont get reflected in its peers and slaves, leading to

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Miklos Szeredi
I'm a bit lost about what is currently done and who advocates for what. It seems to me the MNT_ALLOWUSERMNT (or whatever :) flag should be propagated. In the /share rbind+chroot example, I assume the admin would start by doing mount --bind /share /share mount --make-slave

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Serge E. Hallyn
Quoting Miklos Szeredi ([EMAIL PROTECTED]): I'm a bit lost about what is currently done and who advocates for what. It seems to me the MNT_ALLOWUSERMNT (or whatever :) flag should be propagated. In the /share rbind+chroot example, I assume the admin would start by doing mount

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Eric W. Biederman
Miklos Szeredi [EMAIL PROTECTED] writes: I'm still not sure, what your problem is. My problem right now is that I see a serious complexity escalation in the user interface that we must support indefinitely. I see us taking a nice powerful concept and seriously watering it down. To some extent

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Miklos Szeredi
I'm still not sure, what your problem is. My problem right now is that I see a serious complexity escalation in the user interface that we must support indefinitely. I see us taking a nice powerful concept and seriously watering it down. To some extent we have to avoid confusing suid

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Miklos Szeredi
mount --make-rshared / mkdir -p /mnt/ns/$USER mount --rbind / /mnt/ns/$USER mount --make-rslave /mnt/ns/$USER This was my main point - that the tree in which users can mount will be a slave of /, so that propagating the are user mounts allowed flag among peers is safe and intuitive.

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Ram Pai
On Tue, 2007-04-17 at 19:44 +0200, Miklos Szeredi wrote: I'm a bit lost about what is currently done and who advocates for what. It seems to me the MNT_ALLOWUSERMNT (or whatever :) flag should be propagated. In the /share rbind+chroot example, I assume the admin would start by doing

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Miklos Szeredi
I'm a bit lost about what is currently done and who advocates for what. It seems to me the MNT_ALLOWUSERMNT (or whatever :) flag should be propagated. In the /share rbind+chroot example, I assume the admin would start by doing mount --bind /share /share mount

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Eric W. Biederman
Miklos Szeredi [EMAIL PROTECTED] writes: I'm still not sure, what your problem is. My problem right now is that I see a serious complexity escalation in the user interface that we must support indefinitely. I see us taking a nice powerful concept and seriously watering it down. To some

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-17 Thread Ram Pai
On Tue, 2007-04-17 at 21:43 +0200, Miklos Szeredi wrote: I'm a bit lost about what is currently done and who advocates for what. It seems to me the MNT_ALLOWUSERMNT (or whatever :) flag should be propagated. In the /share rbind+chroot example, I assume the admin would start

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-16 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): > Miklos Szeredi <[EMAIL PROTECTED]> writes: > > >> > That depends. Current patches check the "unprivileged submounts > >> > allowed under this mount" flag only on the requested mount and not on > >> > the propagated mounts. Do you see a problem

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-16 Thread Eric W. Biederman
Miklos Szeredi <[EMAIL PROTECTED]> writes: >> > That depends. Current patches check the "unprivileged submounts >> > allowed under this mount" flag only on the requested mount and not on >> > the propagated mounts. Do you see a problem with this? >> >> I think privileges of this sort should

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-16 Thread Miklos Szeredi
> > > > > Also for bind-mount and remount operations the flag has to be > > > > > propagated > > > > > down its propagation tree. Otherwise a unpriviledged mount in a > > > > > shared > > > > > mount wont get reflected in its peers and slaves, leading to > > > > > unidentical > > > > >

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-16 Thread Ram Pai
On Mon, 2007-04-16 at 11:56 +0200, Miklos Szeredi wrote: > > > > Also for bind-mount and remount operations the flag has to be propagated > > > > down its propagation tree. Otherwise a unpriviledged mount in a shared > > > > mount wont get reflected in its peers and slaves, leading to unidentical

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-16 Thread Miklos Szeredi
> > That depends. Current patches check the "unprivileged submounts > > allowed under this mount" flag only on the requested mount and not on > > the propagated mounts. Do you see a problem with this? > > I think privileges of this sort should propagate. If I read what you > just said

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-16 Thread Eric W. Biederman
Miklos Szeredi <[EMAIL PROTECTED]> writes: > That depends. Current patches check the "unprivileged submounts > allowed under this mount" flag only on the requested mount and not on > the propagated mounts. Do you see a problem with this? I think privileges of this sort should propagate. If I

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-16 Thread Miklos Szeredi
> > > Also for bind-mount and remount operations the flag has to be propagated > > > down its propagation tree. Otherwise a unpriviledged mount in a shared > > > mount wont get reflected in its peers and slaves, leading to unidentical > > > shared-subtrees. > > > > That's an interesting

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-16 Thread Ram Pai
On Mon, 2007-04-16 at 11:32 +0200, Miklos Szeredi wrote: > > > Given the existence of shared subtrees allowing/denying this at the > > > mount > > > namespace level is silly and wrong. > > > > > > If we need more than just the filesystem permission checks can we > > > make it a mount flag

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-16 Thread Miklos Szeredi
> > Given the existence of shared subtrees allowing/denying this at the > > mount > > namespace level is silly and wrong. > > > > If we need more than just the filesystem permission checks can we > > make it a mount flag settable with mount and remount that allows > > non-privileged users the

Re: [Devel] Re: [patch 05/10] add "permit user mounts in new namespace" clone flag

2007-04-16 Thread Ram Pai
> > "Serge E. Hallyn" <[EMAIL PROTECTED]> writes: > > > Quoting Miklos Szeredi ([EMAIL PROTECTED]): > >> From: Miklos Szeredi <[EMAIL PROTECTED]> > >> > >> If CLONE_NEWNS and CLONE_NEWNS_USERMNT are given to clone(2) or > >> unshare(2), then allow user mounts within the new namespace. > >> >

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-16 Thread Ram Pai
Serge E. Hallyn [EMAIL PROTECTED] writes: Quoting Miklos Szeredi ([EMAIL PROTECTED]): From: Miklos Szeredi [EMAIL PROTECTED] If CLONE_NEWNS and CLONE_NEWNS_USERMNT are given to clone(2) or unshare(2), then allow user mounts within the new namespace. This is not flexible

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-16 Thread Miklos Szeredi
Given the existence of shared subtrees allowing/denying this at the mount namespace level is silly and wrong. If we need more than just the filesystem permission checks can we make it a mount flag settable with mount and remount that allows non-privileged users the ability to create

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-16 Thread Ram Pai
On Mon, 2007-04-16 at 11:32 +0200, Miklos Szeredi wrote: Given the existence of shared subtrees allowing/denying this at the mount namespace level is silly and wrong. If we need more than just the filesystem permission checks can we make it a mount flag settable with mount and

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-16 Thread Miklos Szeredi
Also for bind-mount and remount operations the flag has to be propagated down its propagation tree. Otherwise a unpriviledged mount in a shared mount wont get reflected in its peers and slaves, leading to unidentical shared-subtrees. That's an interesting question. Do we want

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-16 Thread Eric W. Biederman
Miklos Szeredi [EMAIL PROTECTED] writes: That depends. Current patches check the unprivileged submounts allowed under this mount flag only on the requested mount and not on the propagated mounts. Do you see a problem with this? I think privileges of this sort should propagate. If I read

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-16 Thread Miklos Szeredi
That depends. Current patches check the unprivileged submounts allowed under this mount flag only on the requested mount and not on the propagated mounts. Do you see a problem with this? I think privileges of this sort should propagate. If I read what you just said correctly if I have

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-16 Thread Ram Pai
On Mon, 2007-04-16 at 11:56 +0200, Miklos Szeredi wrote: Also for bind-mount and remount operations the flag has to be propagated down its propagation tree. Otherwise a unpriviledged mount in a shared mount wont get reflected in its peers and slaves, leading to unidentical

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-16 Thread Miklos Szeredi
Also for bind-mount and remount operations the flag has to be propagated down its propagation tree. Otherwise a unpriviledged mount in a shared mount wont get reflected in its peers and slaves, leading to unidentical shared-subtrees. That's an

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-16 Thread Eric W. Biederman
Miklos Szeredi [EMAIL PROTECTED] writes: That depends. Current patches check the unprivileged submounts allowed under this mount flag only on the requested mount and not on the propagated mounts. Do you see a problem with this? I think privileges of this sort should propagate. If I

Re: [Devel] Re: [patch 05/10] add permit user mounts in new namespace clone flag

2007-04-16 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): Miklos Szeredi [EMAIL PROTECTED] writes: That depends. Current patches check the unprivileged submounts allowed under this mount flag only on the requested mount and not on the propagated mounts. Do you see a problem with this? I