summaryrefslogtreecommitdiff
path: root/ipc/util.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-12-10 03:40:06 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-01-04 15:14:39 -0500
commita33e6751003c5ade603737d828b1519d980ce392 (patch)
treeaa484d033e886945aed78172dbdd4d2fd928bacf /ipc/util.c
parentf3298dc4f2277874d40cb4fc3a6e277317d6603b (diff)
sanitize audit_ipc_obj()
* get rid of allocations * make it return void * simplify callers Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'ipc/util.c')
-rw-r--r--ipc/util.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ipc/util.c b/ipc/util.c
index 5a1808c774a..579552abd50 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -624,10 +624,9 @@ void ipc_rcu_putref(void *ptr)
int ipcperms (struct kern_ipc_perm *ipcp, short flag)
{ /* flag will most probably be 0 or S_...UGO from <linux/stat.h> */
uid_t euid = current_euid();
- int requested_mode, granted_mode, err;
+ int requested_mode, granted_mode;
- if (unlikely((err = audit_ipc_obj(ipcp))))
- return err;
+ audit_ipc_obj(ipcp);
requested_mode = (flag >> 6) | (flag >> 3) | flag;
granted_mode = ipcp->mode;
if (euid == ipcp->cuid ||
@@ -803,9 +802,7 @@ struct kern_ipc_perm *ipcctl_pre_down(struct ipc_ids *ids, int id, int cmd,
goto out_up;
}
- err = audit_ipc_obj(ipcp);
- if (err)
- goto out_unlock;
+ audit_ipc_obj(ipcp);
if (cmd == IPC_SET) {
err = audit_ipc_set_perm(extra_perm, perm->uid,