diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-08-03 10:59:26 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-08-03 10:59:26 -0400 |
commit | d51374adf5f2f88155a072d3d801104e3c0c3d7f (patch) | |
tree | 2b87e74cdb43fca5635cc25fb5a419cbb686ce00 /include/linux/audit.h | |
parent | 471a5c7c839114cc8b55876203aeb2817c33e3c5 (diff) | |
download | linux-stable-d51374adf5f2f88155a072d3d801104e3c0c3d7f.tar.gz linux-stable-d51374adf5f2f88155a072d3d801104e3c0c3d7f.tar.bz2 linux-stable-d51374adf5f2f88155a072d3d801104e3c0c3d7f.zip |
[PATCH] mark context of syscall entered with no rules as dummy
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r-- | include/linux/audit.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index f1bfcff497bf..3f736d658218 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -329,6 +329,11 @@ extern void __audit_inode(const char *name, const struct inode *inode); extern void __audit_inode_child(const char *dname, const struct inode *inode, const struct inode *parent); extern void __audit_inode_update(const struct inode *inode); +static inline int audit_dummy_context(void) +{ + void *p = current->audit_context; + return !p || *(int *)p; +} static inline void audit_getname(const char *name) { if (unlikely(current->audit_context)) @@ -416,6 +421,7 @@ extern int audit_n_rules; #define audit_free(t) do { ; } while (0) #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) #define audit_syscall_exit(f,r) do { ; } while (0) +#define audit_dummy_context() 1 #define audit_getname(n) do { ; } while (0) #define audit_putname(n) do { ; } while (0) #define __audit_inode(n,i) do { ; } while (0) |