aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-12-10 03:47:15 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-01-04 15:14:40 -0500
commite816f370cbadd2afea9f1a42f232d0636137d563 (patch)
tree8a9fe488ced59cd9864fcbf15292641c3b95143c /ipc
parenta33e6751003c5ade603737d828b1519d980ce392 (diff)
sanitize audit_ipc_set_perm()
* get rid of allocations * make it return void * simplify callers Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/util.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ipc/util.c b/ipc/util.c
index 579552abd50a..7585a72e259b 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -803,13 +803,9 @@ struct kern_ipc_perm *ipcctl_pre_down(struct ipc_ids *ids, int id, int cmd,
803 } 803 }
804 804
805 audit_ipc_obj(ipcp); 805 audit_ipc_obj(ipcp);
806 806 if (cmd == IPC_SET)
807 if (cmd == IPC_SET) { 807 audit_ipc_set_perm(extra_perm, perm->uid,
808 err = audit_ipc_set_perm(extra_perm, perm->uid,
809 perm->gid, perm->mode); 808 perm->gid, perm->mode);
810 if (err)
811 goto out_unlock;
812 }
813 809
814 euid = current_euid(); 810 euid = current_euid();
815 if (euid == ipcp->cuid || 811 if (euid == ipcp->cuid ||
@@ -817,7 +813,6 @@ struct kern_ipc_perm *ipcctl_pre_down(struct ipc_ids *ids, int id, int cmd,
817 return ipcp; 813 return ipcp;
818 814
819 err = -EPERM; 815 err = -EPERM;
820out_unlock:
821 ipc_unlock(ipcp); 816 ipc_unlock(ipcp);
822out_up: 817out_up:
823 up_write(&ids->rw_mutex); 818 up_write(&ids->rw_mutex);