summaryrefslogtreecommitdiffstats
path: root/ipc/msg.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-12-16 05:34:03 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-12-16 05:34:03 +0000
commit967c65a99059fd459b956c1588ce0ba227912c4e (patch)
tree8224d013ff5d255420713d05610c7efebd204d2a /ipc/msg.c
parente20c1cc1656a66a2773bca4591a895cbc12696ff (diff)
Merge with Linux 2.1.72, part 1.
Diffstat (limited to 'ipc/msg.c')
-rw-r--r--ipc/msg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipc/msg.c b/ipc/msg.c
index 0bf4a695e..6ff658b02 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -669,8 +669,8 @@ asmlinkage int sys_msgctl (int msqid, int cmd, struct msqid_ds *buf)
goto out;
case IPC_SET:
err = -EPERM;
- if (!suser() && current->euid != ipcp->cuid &&
- current->euid != ipcp->uid)
+ if (current->euid != ipcp->cuid &&
+ current->euid != ipcp->uid && !suser())
goto out;
if (tbuf.msg_qbytes > MSGMNB && !suser())
goto out;
@@ -684,8 +684,8 @@ asmlinkage int sys_msgctl (int msqid, int cmd, struct msqid_ds *buf)
goto out;
case IPC_RMID:
err = -EPERM;
- if (!suser() && current->euid != ipcp->cuid &&
- current->euid != ipcp->uid)
+ if (current->euid != ipcp->cuid &&
+ current->euid != ipcp->uid && !suser())
goto out;
/*
* There is only one kerneld message queue,