lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sat, 20 Jan 2007 11:44:56 -0800
From:	Sukadev Bhattiprolu <sukadev@...ibm.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	linux-kernel@...r.kernel.org,
	Containers <containers@...ts.osdl.org>, clg@...ibm.com,
	"David C. Hansen" <haveblue@...ibm.com>, serue@...ibm.com,
	ebiederm@...ssion.com
Subject: [PATCH 2/2] Explicitly set pgid/sid of init


Pls treat this patch as Patch 2/2 where Patch 1/2 is

	http://lkml.org/lkml/2007/1/19/159
---

From: Sukadev Bhattiprolu <sukadev@...ibm.com>

Explicitly set pgid and sid of init process to 1.

Signed-off-by: Sukadev Bhattiprolu <sukadev@...ibm.com>
Cc: Cedric Le Goater <clg@...ibm.com>
Cc: Dave Hansen <haveblue@...ibm.com>
Cc: Serge Hallyn <serue@...ibm.com>
Cc: Eric Biederman <ebiederm@...ssion.com>
Cc: containers@...ts.osdl.org
---
 init/main.c   |    1 +
 kernel/exit.c |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

Index: lx26-20-rc4-mm1/init/main.c
===================================================================
--- lx26-20-rc4-mm1.orig/init/main.c	2007-01-20 11:12:00.803672744 -0800
+++ lx26-20-rc4-mm1/init/main.c	2007-01-20 11:12:20.786634872 -0800
@@ -774,6 +774,7 @@ static int __init init(void * unused)
 	 */
 	init_pid_ns.child_reaper = current;
 
+	__set_special_pids(1, 1);
 	cad_pid = task_pid(current);
 
 	smp_prepare_cpus(max_cpus);
Index: lx26-20-rc4-mm1/kernel/exit.c
===================================================================
--- lx26-20-rc4-mm1.orig/kernel/exit.c	2007-01-20 11:12:00.803672744 -0800
+++ lx26-20-rc4-mm1/kernel/exit.c	2007-01-20 11:12:20.787634720 -0800
@@ -297,12 +297,12 @@ void __set_special_pids(pid_t session, p
 {
 	struct task_struct *curr = current->group_leader;
 
-	if (process_session(curr) != session) {
+	if (pid_nr(task_session(curr)) != session) {
 		detach_pid(curr, PIDTYPE_SID);
 		set_signal_session(curr->signal, session);
 		attach_pid(curr, PIDTYPE_SID, find_pid(session));
 	}
-	if (process_group(curr) != pgrp) {
+	if (pid_nr(task_pgrp(curr)) != pgrp) {
 		detach_pid(curr, PIDTYPE_PGID);
 		curr->signal->pgrp = pgrp;
 		attach_pid(curr, PIDTYPE_PGID, find_pid(pgrp));
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ