diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-02 00:43:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-02 00:43:05 -0400 |
commit | 532f57da408c5a5710075d17047e2d97bdfd22f3 (patch) | |
tree | 3fb378bea1816f637aeeed0df805d0c30969cfc3 /ipc/util.c | |
parent | 46c5ea3c9ae7fbc6e52a13c92e59d4fc7f4ca80a (diff) | |
parent | 2ad312d2093ae506ae0fa184d8d026b559083087 (diff) |
Merge branch 'audit.b10' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b10' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
[PATCH] Audit Filter Performance
[PATCH] Rework of IPC auditing
[PATCH] More user space subject labels
[PATCH] Reworked patch for labels on user space messages
[PATCH] change lspp ipc auditing
[PATCH] audit inode patch
[PATCH] support for context based audit filtering, part 2
[PATCH] support for context based audit filtering
[PATCH] no need to wank with task_lock() and pinning task down in audit_syscall_exit()
[PATCH] drop task argument of audit_syscall_{entry,exit}
[PATCH] drop gfp_mask in audit_log_exit()
[PATCH] move call of audit_free() into do_exit()
[PATCH] sockaddr patch
[PATCH] deal with deadlocks in audit_free()
Diffstat (limited to 'ipc/util.c')
-rw-r--r-- | ipc/util.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ipc/util.c b/ipc/util.c index b3dcfad3b4f7..8193299f45f6 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * Manfred Spraul <manfred@colorfullife.com> | 10 | * Manfred Spraul <manfred@colorfullife.com> |
11 | * Oct 2002 - One lock per IPC id. RCU ipc_free for lock-free grow_ary(). | 11 | * Oct 2002 - One lock per IPC id. RCU ipc_free for lock-free grow_ary(). |
12 | * Mingming Cao <cmm@us.ibm.com> | 12 | * Mingming Cao <cmm@us.ibm.com> |
13 | * Mar 2006 - support for audit of ipc object properties | ||
14 | * Dustin Kirkland <dustin.kirkland@us.ibm.com> | ||
13 | */ | 15 | */ |
14 | 16 | ||
15 | #include <linux/config.h> | 17 | #include <linux/config.h> |
@@ -27,6 +29,7 @@ | |||
27 | #include <linux/workqueue.h> | 29 | #include <linux/workqueue.h> |
28 | #include <linux/seq_file.h> | 30 | #include <linux/seq_file.h> |
29 | #include <linux/proc_fs.h> | 31 | #include <linux/proc_fs.h> |
32 | #include <linux/audit.h> | ||
30 | 33 | ||
31 | #include <asm/unistd.h> | 34 | #include <asm/unistd.h> |
32 | 35 | ||
@@ -464,8 +467,10 @@ void ipc_rcu_putref(void *ptr) | |||
464 | 467 | ||
465 | int ipcperms (struct kern_ipc_perm *ipcp, short flag) | 468 | int ipcperms (struct kern_ipc_perm *ipcp, short flag) |
466 | { /* flag will most probably be 0 or S_...UGO from <linux/stat.h> */ | 469 | { /* flag will most probably be 0 or S_...UGO from <linux/stat.h> */ |
467 | int requested_mode, granted_mode; | 470 | int requested_mode, granted_mode, err; |
468 | 471 | ||
472 | if (unlikely((err = audit_ipc_obj(ipcp)))) | ||
473 | return err; | ||
469 | requested_mode = (flag >> 6) | (flag >> 3) | flag; | 474 | requested_mode = (flag >> 6) | (flag >> 3) | flag; |
470 | granted_mode = ipcp->mode; | 475 | granted_mode = ipcp->mode; |
471 | if (current->euid == ipcp->cuid || current->euid == ipcp->uid) | 476 | if (current->euid == ipcp->cuid || current->euid == ipcp->uid) |