diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-06 09:53:05 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-06 09:53:05 +0100 |
commit | 3d7a96f5a485b7d06c2379f343d7312af89ec9e2 (patch) | |
tree | 5f097f68eb0f9fd3fa4a10f38672e300e9127b10 /ipc/util.c | |
parent | 723cbe0775514853c22dc45005af59c360916af1 (diff) | |
parent | 238c6d54830c624f34ac9cf123ac04aebfca5013 (diff) | |
download | op-kernel-dev-3d7a96f5a485b7d06c2379f343d7312af89ec9e2.zip op-kernel-dev-3d7a96f5a485b7d06c2379f343d7312af89ec9e2.tar.gz |
Merge branch 'linus' into tracing/kmemtrace2
Diffstat (limited to 'ipc/util.c')
-rw-r--r-- | ipc/util.c | 18 |
1 files changed, 5 insertions, 13 deletions
@@ -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,16 +802,10 @@ 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; - - if (cmd == IPC_SET) { - err = audit_ipc_set_perm(extra_perm, perm->uid, + audit_ipc_obj(ipcp); + if (cmd == IPC_SET) + audit_ipc_set_perm(extra_perm, perm->uid, perm->gid, perm->mode); - if (err) - goto out_unlock; - } euid = current_euid(); if (euid == ipcp->cuid || @@ -820,7 +813,6 @@ struct kern_ipc_perm *ipcctl_pre_down(struct ipc_ids *ids, int id, int cmd, return ipcp; err = -EPERM; -out_unlock: ipc_unlock(ipcp); out_up: up_write(&ids->rw_mutex); |