android_kernel_xiaomi_sm7250/fs/autofs4
Miklos Szeredi fbff08706d autofs4: translate pids to the right namespace for the daemon
The PID and the TGID of the process triggering the mount are sent to the
daemon.  Currently the global pid values are sent (ones valid in the
initial pid namespace) but this is wrong if the autofs daemon itself is
not running in the initial pid namespace.

So send the pid values that are valid in the namespace of the autofs
daemon.

The namespace to use is taken from the oz_pgrp pid pointer, which was
set at mount time to the mounting process' pid namespace.

If the pid translation fails (the triggering process is in an unrelated
pid namespace) then the automount fails with ENOENT.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Acked-by: Ian Kent <raven@themaw.net>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-01-23 16:36:59 -08:00
..
autofs_i.h autofs4: allow autofs to work outside the initial PID namespace 2014-01-23 16:36:58 -08:00
dev-ioctl.c autofs4: allow autofs to work outside the initial PID namespace 2014-01-23 16:36:58 -08:00
expire.c helper for reading ->d_count 2013-07-05 18:59:33 +04:00
init.c fs: Limit sys_mount to only request filesystem modules. 2013-03-03 19:36:31 -08:00
inode.c autofs4: allow autofs to work outside the initial PID namespace 2014-01-23 16:36:58 -08:00
Kconfig fs/Kconfig: move autofs, autofs4 out 2009-01-22 13:15:54 +03:00
Makefile autofs4: add miscellaneous device for ioctls 2008-10-16 11:21:39 -07:00
root.c helper for reading ->d_count 2013-07-05 18:59:33 +04:00
symlink.c autofs4: keep symlink body in inode->i_private 2011-01-18 01:21:27 -05:00
waitq.c autofs4: translate pids to the right namespace for the daemon 2014-01-23 16:36:59 -08:00