2 * AppArmor security module
4 * This file contains AppArmor auditing function definitions.
6 * Copyright (C) 1998-2008 Novell/SUSE
7 * Copyright 2009-2010 Canonical Ltd.
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation, version 2 of the
18 #include <linux/audit.h>
20 #include <linux/lsm_audit.h>
21 #include <linux/sched.h>
22 #include <linux/slab.h>
28 extern const char *const audit_mode_names[];
29 #define AUDIT_MAX_INDEX 5
32 AUDIT_NORMAL, /* follow normal auditing of accesses */
33 AUDIT_QUIET_DENIED, /* quiet all denied access messages */
34 AUDIT_QUIET, /* quiet all messages */
35 AUDIT_NOQUIET, /* do not quiet audit messages */
36 AUDIT_ALL /* audit all accesses */
41 AUDIT_APPARMOR_ALLOWED,
42 AUDIT_APPARMOR_DENIED,
44 AUDIT_APPARMOR_STATUS,
50 extern const char *const op_table[];
106 /* define a short hand for apparmor_audit_data portion of common_audit_data */
107 #define aad apparmor_audit_data
109 void aa_audit_msg(int type, struct common_audit_data *sa,
110 void (*cb) (struct audit_buffer *, void *));
111 int aa_audit(int type, struct aa_profile *profile, gfp_t gfp,
112 struct common_audit_data *sa,
113 void (*cb) (struct audit_buffer *, void *));
115 static inline int complain_error(int error)
117 if (error == -EPERM || error == -EACCES)
122 #endif /* __AA_AUDIT_H */