]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
fix setsid() for sub-namespace /sbin/init
authorOleg Nesterov <oleg@tv-sign.ru>
Fri, 8 Feb 2008 12:19:09 +0000 (04:19 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 8 Feb 2008 17:22:27 +0000 (09:22 -0800)
commite4cc0a9c876d4d4eadaef97a2bff4a199946d202
treee25406d84ce842c54e3ac5438e4bcee32a75a964
parent4e021306cff4277764a42065214fc73f2d26be4b
fix setsid() for sub-namespace /sbin/init

sys_setsid() still deals with pid_t's from the global namespace. This means
that the "session > 1" check can't help for sub-namespace init, setsid() can't
succeed because copy_process(CLONE_NEWPID) populates PIDTYPE_PGID/SID links.

Remove the usage of task_struct->pid and convert the code to use "struct pid".
This also simplifies and speedups the code, saves one find_pid().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/sys.c