patch-1.3.78 linux/kernel/exit.c

Next file: linux/kernel/fork.c
Previous file: linux/init/main.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.77/linux/kernel/exit.c linux/kernel/exit.c
@@ -49,7 +49,9 @@
 	if (!p || sig > 32)
 		return -EINVAL;
 	if (!priv && ((sig != SIGCONT) || (current->session != p->session)) &&
-	    (current->euid != p->euid) && (current->euid != p->uid) && !suser())
+	    (current->euid ^ p->euid) && (current->euid ^ p->uid) &&
+	    (current->uid ^ p->euid) && (current->uid ^ p->uid) &&
+	    !suser())
 		return -EPERM;
 	if (!sig)
 		return 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this