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 | |
parent | 471a5c7c839114cc8b55876203aeb2817c33e3c5 (diff) |
[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')
-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); | |||
329 | extern void __audit_inode_child(const char *dname, const struct inode *inode, | 329 | extern void __audit_inode_child(const char *dname, const struct inode *inode, |
330 | const struct inode *parent); | 330 | const struct inode *parent); |
331 | extern void __audit_inode_update(const struct inode *inode); | 331 | extern void __audit_inode_update(const struct inode *inode); |
332 | static inline int audit_dummy_context(void) | ||
333 | { | ||
334 | void *p = current->audit_context; | ||
335 | return !p || *(int *)p; | ||
336 | } | ||
332 | static inline void audit_getname(const char *name) | 337 | static inline void audit_getname(const char *name) |
333 | { | 338 | { |
334 | if (unlikely(current->audit_context)) | 339 | if (unlikely(current->audit_context)) |
@@ -416,6 +421,7 @@ extern int audit_n_rules; | |||
416 | #define audit_free(t) do { ; } while (0) | 421 | #define audit_free(t) do { ; } while (0) |
417 | #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) | 422 | #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) |
418 | #define audit_syscall_exit(f,r) do { ; } while (0) | 423 | #define audit_syscall_exit(f,r) do { ; } while (0) |
424 | #define audit_dummy_context() 1 | ||
419 | #define audit_getname(n) do { ; } while (0) | 425 | #define audit_getname(n) do { ; } while (0) |
420 | #define audit_putname(n) do { ; } while (0) | 426 | #define audit_putname(n) do { ; } while (0) |
421 | #define __audit_inode(n,i) do { ; } while (0) | 427 | #define __audit_inode(n,i) do { ; } while (0) |