From: Oleg Nesterov Date: Fri, 8 Feb 2008 12:19:12 +0000 (-0800) Subject: sys_setsid: remove now unneeded session != 1 check X-Git-Tag: v2.6.25-rc1~215 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6806aac6d282d58b97763f5e17e2787e62c3b440;p=linux-2.6-omap-h63xx.git sys_setsid: remove now unneeded session != 1 check Eric's "fix clone(CLONE_NEWPID)" eliminated the last reason for this hack. Signed-off-by: Oleg Nesterov Cc: "Eric W. Biederman" Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/sys.c b/kernel/sys.c index 7de9c984f69..ee2e78dbea6 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -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;