提交 6806aac6 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

sys_setsid: remove now unneeded session != 1 check

Eric's "fix clone(CLONE_NEWPID)" eliminated the last reason for this hack.
Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d12619b5
......@@ -1056,11 +1056,8 @@ asmlinkage long sys_setsid(void)
/* Fail if a process group id already exists that equals the
* proposed session id.
*
* Don't check if session == 1, clone(CLONE_NEWPID) creates
* this group/session beforehand.
*/
if (session != 1 && pid_task(sid, PIDTYPE_PGID))
if (pid_task(sid, PIDTYPE_PGID))
goto out;
group_leader->signal->leader = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册