sys_setsid: remove now unneeded session != 1 check
authorOleg Nesterov <oleg@tv-sign.ru>
Fri, 8 Feb 2008 12:19:12 +0000 (04:19 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 8 Feb 2008 17:22:27 +0000 (09:22 -0800)
Eric's "fix clone(CLONE_NEWPID)" eliminated the last reason for this hack.

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

index 7de9c98..ee2e78d 100644 (file)
@@ -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;