diff options
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r-- | include/linux/audit.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index e24afabc548f..8b5c0620abf9 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -102,6 +102,7 @@ | |||
102 | #define AUDIT_EOE 1320 /* End of multi-record event */ | 102 | #define AUDIT_EOE 1320 /* End of multi-record event */ |
103 | #define AUDIT_BPRM_FCAPS 1321 /* Information about fcaps increasing perms */ | 103 | #define AUDIT_BPRM_FCAPS 1321 /* Information about fcaps increasing perms */ |
104 | #define AUDIT_CAPSET 1322 /* Record showing argument to sys_capset */ | 104 | #define AUDIT_CAPSET 1322 /* Record showing argument to sys_capset */ |
105 | #define AUDIT_MMAP 1323 /* Record showing descriptor and flags in mmap */ | ||
105 | 106 | ||
106 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 107 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
107 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 108 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
@@ -478,6 +479,7 @@ extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, | |||
478 | const struct cred *new, | 479 | const struct cred *new, |
479 | const struct cred *old); | 480 | const struct cred *old); |
480 | extern void __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old); | 481 | extern void __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old); |
482 | extern void __audit_mmap_fd(int fd, int flags); | ||
481 | 483 | ||
482 | static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) | 484 | static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) |
483 | { | 485 | { |
@@ -531,6 +533,12 @@ static inline void audit_log_capset(pid_t pid, const struct cred *new, | |||
531 | __audit_log_capset(pid, new, old); | 533 | __audit_log_capset(pid, new, old); |
532 | } | 534 | } |
533 | 535 | ||
536 | static inline void audit_mmap_fd(int fd, int flags) | ||
537 | { | ||
538 | if (unlikely(!audit_dummy_context())) | ||
539 | __audit_mmap_fd(fd, flags); | ||
540 | } | ||
541 | |||
534 | extern int audit_n_rules; | 542 | extern int audit_n_rules; |
535 | extern int audit_signals; | 543 | extern int audit_signals; |
536 | #else | 544 | #else |
@@ -564,6 +572,7 @@ extern int audit_signals; | |||
564 | #define audit_mq_getsetattr(d,s) ((void)0) | 572 | #define audit_mq_getsetattr(d,s) ((void)0) |
565 | #define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; }) | 573 | #define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; }) |
566 | #define audit_log_capset(pid, ncr, ocr) ((void)0) | 574 | #define audit_log_capset(pid, ncr, ocr) ((void)0) |
575 | #define audit_mmap_fd(fd, flags) ((void)0) | ||
567 | #define audit_ptrace(t) ((void)0) | 576 | #define audit_ptrace(t) ((void)0) |
568 | #define audit_n_rules 0 | 577 | #define audit_n_rules 0 |
569 | #define audit_signals 0 | 578 | #define audit_signals 0 |