Merge tag 'audit-pr-20171113' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoor...
[sfrench/cifs-2.6.git] / include / linux / audit.h
index cb708eb8accc59d3dafee57c7c696647e80be471..af410d9fbf2da9f904bac6e8309c2b097142fea9 100644 (file)
@@ -149,12 +149,6 @@ extern void                    audit_log_key(struct audit_buffer *ab,
 extern void                audit_log_link_denied(const char *operation,
                                                  const struct path *link);
 extern void                audit_log_lost(const char *message);
-#ifdef CONFIG_SECURITY
-extern void                audit_log_secctx(struct audit_buffer *ab, u32 secid);
-#else
-static inline void         audit_log_secctx(struct audit_buffer *ab, u32 secid)
-{ }
-#endif
 
 extern int audit_log_task_context(struct audit_buffer *ab);
 extern void audit_log_task_info(struct audit_buffer *ab,
@@ -203,8 +197,6 @@ static inline void audit_log_key(struct audit_buffer *ab, char *key)
 static inline void audit_log_link_denied(const char *string,
                                         const struct path *link)
 { }
-static inline void audit_log_secctx(struct audit_buffer *ab, u32 secid)
-{ }
 static inline int audit_log_task_context(struct audit_buffer *ab)
 {
        return 0;
@@ -356,6 +348,7 @@ extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
 extern void __audit_log_capset(const struct cred *new, const struct cred *old);
 extern void __audit_mmap_fd(int fd, int flags);
 extern void __audit_log_kern_module(char *name);
+extern void __audit_fanotify(unsigned int response);
 
 static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
 {
@@ -452,6 +445,12 @@ static inline void audit_log_kern_module(char *name)
                __audit_log_kern_module(name);
 }
 
+static inline void audit_fanotify(unsigned int response)
+{
+       if (!audit_dummy_context())
+               __audit_fanotify(response);
+}
+
 extern int audit_n_rules;
 extern int audit_signals;
 #else /* CONFIG_AUDITSYSCALL */
@@ -568,6 +567,9 @@ static inline void audit_log_kern_module(char *name)
 {
 }
 
+static inline void audit_fanotify(unsigned int response)
+{ }
+
 static inline void audit_ptrace(struct task_struct *t)
 { }
 #define audit_n_rules 0