patch-2.0.7 linux/kernel/sys.c

Next file: linux/net/socket.c
Previous file: linux/include/linux/pci.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.6/linux/kernel/sys.c linux/kernel/sys.c
@@ -636,8 +636,11 @@
 {
 	struct task_struct * p;
 
+	if (current->leader)
+		return -EPERM;
+
 	for_each_task(p) {
-		if (p->pgrp == current->pid)
+		if (p != current && p->pgrp == current->pid)
 		        return -EPERM;
 	}
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov