diff options
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r-- | include/linux/audit.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index fd65078e794a..739b954cb242 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -260,7 +260,20 @@ extern void audit_syscall_entry(struct task_struct *task, int arch, | |||
260 | extern void audit_syscall_exit(struct task_struct *task, int failed, long return_code); | 260 | extern void audit_syscall_exit(struct task_struct *task, int failed, long return_code); |
261 | extern void audit_getname(const char *name); | 261 | extern void audit_getname(const char *name); |
262 | extern void audit_putname(const char *name); | 262 | extern void audit_putname(const char *name); |
263 | extern void audit_inode(const char *name, const struct inode *inode, unsigned flags); | 263 | extern void __audit_inode(const char *name, const struct inode *inode, unsigned flags); |
264 | extern void __audit_inode_child(const char *dname, const struct inode *inode, | ||
265 | unsigned long pino); | ||
266 | static inline void audit_inode(const char *name, const struct inode *inode, | ||
267 | unsigned flags) { | ||
268 | if (unlikely(current->audit_context)) | ||
269 | __audit_inode(name, inode, flags); | ||
270 | } | ||
271 | static inline void audit_inode_child(const char *dname, | ||
272 | const struct inode *inode, | ||
273 | unsigned long pino) { | ||
274 | if (unlikely(current->audit_context)) | ||
275 | __audit_inode_child(dname, inode, pino); | ||
276 | } | ||
264 | 277 | ||
265 | /* Private API (for audit.c only) */ | 278 | /* Private API (for audit.c only) */ |
266 | extern int audit_receive_filter(int type, int pid, int uid, int seq, | 279 | extern int audit_receive_filter(int type, int pid, int uid, int seq, |
@@ -283,7 +296,10 @@ extern int audit_filter_user(struct netlink_skb_parms *cb, int type); | |||
283 | #define audit_syscall_exit(t,f,r) do { ; } while (0) | 296 | #define audit_syscall_exit(t,f,r) do { ; } while (0) |
284 | #define audit_getname(n) do { ; } while (0) | 297 | #define audit_getname(n) do { ; } while (0) |
285 | #define audit_putname(n) do { ; } while (0) | 298 | #define audit_putname(n) do { ; } while (0) |
299 | #define __audit_inode(n,i,f) do { ; } while (0) | ||
300 | #define __audit_inode_child(d,i,p) do { ; } while (0) | ||
286 | #define audit_inode(n,i,f) do { ; } while (0) | 301 | #define audit_inode(n,i,f) do { ; } while (0) |
302 | #define audit_inode_child(d,i,p) do { ; } while (0) | ||
287 | #define audit_receive_filter(t,p,u,s,d,l) ({ -EOPNOTSUPP; }) | 303 | #define audit_receive_filter(t,p,u,s,d,l) ({ -EOPNOTSUPP; }) |
288 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) | 304 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) |
289 | #define audit_get_loginuid(c) ({ -1; }) | 305 | #define audit_get_loginuid(c) ({ -1; }) |