Skip to content

Commit

Permalink
sys_setsid: remove now unneeded session != 1 check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Feb 8, 2008
1 parent d12619b commit 6806aac
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6806aac

Please sign in to comment.