summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-08-03 16:59:26 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2006-08-03 16:59:26 +0200
commitd51374adf5f2f88155a072d3d801104e3c0c3d7f (patch)
tree2b87e74cdb43fca5635cc25fb5a419cbb686ce00 /include
parent[PATCH] introduce audit rules counter (diff)
downloadlinux-d51374adf5f2f88155a072d3d801104e3c0c3d7f.tar.xz
linux-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')
-rw-r--r--include/linux/audit.h6
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)