Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6806aac6 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds
Browse files

sys_setsid: remove now unneeded session != 1 check



Eric's "fix clone(CLONE_NEWPID)" eliminated the last reason for this hack.

Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d12619b5
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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;