2
Subject: Export audit subsystem for use by modules
5
Adds necessary export symbols for audit subsystem routines.
6
Changes audit_log_vformat to be externally visible (analagous to vprintf)
7
Patch is not in mainline -- pending AppArmor code submission to lkml
11
include/linux/audit.h | 5 +++++
12
kernel/audit.c | 6 ++++--
13
2 files changed, 9 insertions(+), 2 deletions(-)
15
Index: b/include/linux/audit.h
16
===================================================================
17
--- a/include/linux/audit.h
18
+++ b/include/linux/audit.h
20
#define AUDIT_LAST_KERN_ANOM_MSG 1799
21
#define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */
23
+#define AUDIT_APPARMOR 1500 /* AppArmor audit */
25
#define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */
28
@@ -478,6 +480,9 @@ extern void audit_log(struct audit_
29
__attribute__((format(printf,4,5)));
31
extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
32
+extern void audit_log_vformat(struct audit_buffer *ab,
33
+ const char *fmt, va_list args)
34
+ __attribute__((format(printf,2,0)));
35
extern void audit_log_format(struct audit_buffer *ab,
37
__attribute__((format(printf,2,3)));
38
Index: b/kernel/audit.c
39
===================================================================
42
@@ -956,8 +956,7 @@ static inline int audit_expand(struct au
43
* will be called a second time. Currently, we assume that a printk
44
* can't format message larger than 1024 bytes, so we don't either.
46
-static void audit_log_vformat(struct audit_buffer *ab, const char *fmt,
48
+void audit_log_vformat(struct audit_buffer *ab, const char *fmt, va_list args)
52
@@ -1213,3 +1212,6 @@ EXPORT_SYMBOL(audit_log_start);
53
EXPORT_SYMBOL(audit_log_end);
54
EXPORT_SYMBOL(audit_log_format);
55
EXPORT_SYMBOL(audit_log);
56
+EXPORT_SYMBOL_GPL(audit_log_vformat);
57
+EXPORT_SYMBOL_GPL(audit_log_untrustedstring);
58
+EXPORT_SYMBOL_GPL(audit_log_d_path);