Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-21 Thread Stanislav Kinsbursky
21.05.2013 20:29, Oleg Nesterov пишет: On 05/21, J. Bruce Fields wrote: On Tue, May 21, 2013 at 05:28:36PM +0200, Oleg Nesterov wrote: OK, so do not do this. Export the new helper. You mean, export umh_set_fs_root() in the above? That might be OK. Yes, or even call_usermodehelper_root().

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-21 Thread Rusty Russell
Stanislav Kinsbursky writes: > Usermode helper executes all binaries in global "init" root context. This > doesn't allow to call to call the binary from other root (for example in a > container). > Currently, containerized NFS server requires an ability to execute a binary in > a other context, th

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-21 Thread Oleg Nesterov
On 05/21, J. Bruce Fields wrote: > > On Tue, May 21, 2013 at 05:28:36PM +0200, Oleg Nesterov wrote: > > > > OK, so do not do this. Export the new helper. > > You mean, export umh_set_fs_root() in the above? > > That might be OK. Yes, or even call_usermodehelper_root(). I didn't argue with the new

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-21 Thread J. Bruce Fields
On Tue, May 21, 2013 at 05:28:36PM +0200, Oleg Nesterov wrote: > You know, I am puzzled. Everything looks so clear that I can't > understand what I could miss. > > On 05/20, J. Bruce Fields wrote: > > > > On Mon, May 20, 2013 at 05:10:01PM +0200, Oleg Nesterov wrote: > > > On 05/20, Stanislav Kins

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-21 Thread Oleg Nesterov
You know, I am puzzled. Everything looks so clear that I can't understand what I could miss. On 05/20, J. Bruce Fields wrote: > > On Mon, May 20, 2013 at 05:10:01PM +0200, Oleg Nesterov wrote: > > On 05/20, Stanislav Kinsbursky wrote: > > > > > OK, why nfs can't simply use this code > > > > st

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread J. Bruce Fields
On Mon, May 20, 2013 at 05:10:01PM +0200, Oleg Nesterov wrote: > On 05/20, Stanislav Kinsbursky wrote: > > > > Moreover, set_fs_root() is not exported. > > Then it should be exported, I think ;) Maybe--there are objections, see below. > Or you can export the new helper. > > > And adding an abil

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread Oleg Nesterov
On 05/20, Stanislav Kinsbursky wrote: > > 20.05.2013 17:57, Oleg Nesterov пишет: >> >> Why do we need the new member/arguments? >> >>> @@ -215,6 +216,9 @@ static int call_usermodehelper(void *data) >>> */ >>> set_user_nice(current, 0); >>> >>> + if (sub_info->root) >>> + se

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread Stanislav Kinsbursky
20.05.2013 17:57, Oleg Nesterov пишет: On 05/20, Stanislav Kinsbursky wrote: Usermode helper executes all binaries in global "init" root context. This doesn't allow to call to call the binary from other root (for example in a container). Currently, containerized NFS server requires an ability t

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread Oleg Nesterov
On 05/20, Stanislav Kinsbursky wrote: > > Usermode helper executes all binaries in global "init" root context. This > doesn't allow to call to call the binary from other root (for example in a > container). > Currently, containerized NFS server requires an ability to execute a binary in > a other c

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread Stanislav Kinsbursky
20.05.2013 12:42, Jeff Layton пишет: On Mon, 20 May 2013 11:00:37 +0400 Stanislav Kinsbursky wrote: Usermode helper executes all binaries in global "init" root context. This doesn't allow to call to call the binary from other root (for example in a container). Currently, containerized NFS serv

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread Jeff Layton
On Mon, 20 May 2013 11:00:37 +0400 Stanislav Kinsbursky wrote: > Usermode helper executes all binaries in global "init" root context. This > doesn't allow to call to call the binary from other root (for example in a > container). > Currently, containerized NFS server requires an ability to execut

[RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread Stanislav Kinsbursky
Usermode helper executes all binaries in global "init" root context. This doesn't allow to call to call the binary from other root (for example in a container). Currently, containerized NFS server requires an ability to execute a binary in a other context, than "init" root (UMH is used for client r