mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] mark context of syscall entered with no rules as dummy
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
471a5c7c83
commit
d51374adf5
2 changed files with 10 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue