summaryrefslogtreecommitdiffstats
path: root/ipc/msg.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-05-05 15:45:48 +1000
committerPaul Mackerras <paulus@samba.org>2006-05-05 15:45:48 +1000
commitf18fc729cd2d67b76e24206ee3567c1f6983c358 (patch)
tree9dbf177222d94213d9dd82d67de6d905e1a2b278 /ipc/msg.c
parent5a43ee65620d628ba04deecf241b63b2410b97f2 (diff)
parentd98550e334715b2d9e45f8f0f4e1608720108640 (diff)
downloadblackbird-op-linux-f18fc729cd2d67b76e24206ee3567c1f6983c358.tar.gz
blackbird-op-linux-f18fc729cd2d67b76e24206ee3567c1f6983c358.zip
Merge ../linux-2.6
Diffstat (limited to 'ipc/msg.c')
-rw-r--r--ipc/msg.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/ipc/msg.c b/ipc/msg.c
index 48a7f17a7236..7d1340ccb16b 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -13,6 +13,9 @@
* mostly rewritten, threaded and wake-one semantics added
* MSGMAX limit removed, sysctl's added
* (c) 1999 Manfred Spraul <manfred@colorfullife.com>
+ *
+ * support for audit of ipc object properties and permission changes
+ * Dustin Kirkland <dustin.kirkland@us.ibm.com>
*/
#include <linux/capability.h>
@@ -447,6 +450,11 @@ asmlinkage long sys_msgctl (int msqid, int cmd, struct msqid_ds __user *buf)
if (msg_checkid(msq,msqid))
goto out_unlock_up;
ipcp = &msq->q_perm;
+
+ err = audit_ipc_obj(ipcp);
+ if (err)
+ goto out_unlock_up;
+
err = -EPERM;
if (current->euid != ipcp->cuid &&
current->euid != ipcp->uid && !capable(CAP_SYS_ADMIN))
@@ -460,7 +468,8 @@ asmlinkage long sys_msgctl (int msqid, int cmd, struct msqid_ds __user *buf)
switch (cmd) {
case IPC_SET:
{
- if ((err = audit_ipc_perms(setbuf.qbytes, setbuf.uid, setbuf.gid, setbuf.mode, ipcp)))
+ err = audit_ipc_set_perm(setbuf.qbytes, setbuf.uid, setbuf.gid, setbuf.mode, ipcp);
+ if (err)
goto out_unlock_up;
err = -EPERM;
OpenPOWER on IntegriCloud