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 *audit_mode_names
[];
29 #define AUDIT_MAX_INDEX 5
31 #define AUDIT_APPARMOR_AUTO 0 /* auto choose audit message type */
34 AUDIT_NORMAL
, /* follow normal auditing of accesses */
35 AUDIT_QUIET_DENIED
, /* quiet all denied access messages */
36 AUDIT_QUIET
, /* quiet all messages */
37 AUDIT_NOQUIET
, /* do not quiet audit messages */
38 AUDIT_ALL
/* audit all accesses */
43 AUDIT_APPARMOR_ALLOWED
,
44 AUDIT_APPARMOR_DENIED
,
46 AUDIT_APPARMOR_STATUS
,
51 extern const char *op_table
[];
107 /* define a short hand for apparmor_audit_data portion of common_audit_data */
108 #define aad apparmor_audit_data
110 void aa_audit_msg(int type
, struct common_audit_data
*sa
,
111 void (*cb
) (struct audit_buffer
*, void *));
112 int aa_audit(int type
, struct aa_profile
*profile
, gfp_t gfp
,
113 struct common_audit_data
*sa
,
114 void (*cb
) (struct audit_buffer
*, void *));
116 static inline int complain_error(int error
)
118 if (error
== -EPERM
|| error
== -EACCES
)
123 #endif /* __AA_AUDIT_H */