patch-2.1.72 linux/ipc/sem.c

Next file: linux/ipc/shm.c
Previous file: linux/ipc/msg.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.71/linux/ipc/sem.c linux/ipc/sem.c
@@ -487,7 +487,7 @@
 			goto out;
 		break;
 	case IPC_RMID:
-		if (suser() || current->euid == ipcp->cuid || current->euid == ipcp->uid) {
+		if (current->euid == ipcp->cuid || current->euid == ipcp->uid || suser()) {
 			freeary (id);
 			err = 0;
 			goto out;
@@ -545,7 +545,7 @@
 		update_queue(sma);
 		break;
 	case IPC_SET:
-		if (suser() || current->euid == ipcp->cuid || current->euid == ipcp->uid) {
+		if (current->euid == ipcp->cuid || current->euid == ipcp->uid || suser()) {
 			ipcp->uid = tbuf.sem_perm.uid;
 			ipcp->gid = tbuf.sem_perm.gid;
 			ipcp->mode = (ipcp->mode & ~S_IRWXUGO)

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