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
--- linux-2.6.18.orig/include/linux/audit.h
16
+++ linux-2.6.18/include/linux/audit.h
18
#define AUDIT_LAST_KERN_ANOM_MSG 1799
19
#define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */
21
+#define AUDIT_SD 1500 /* AppArmor (SubDomain) audit */
23
#define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */
26
@@ -466,6 +468,9 @@ extern void audit_log(struct audit_
27
__attribute__((format(printf,4,5)));
29
extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
30
+extern void audit_log_vformat(struct audit_buffer *ab,
31
+ const char *fmt, va_list args)
32
+ __attribute__((format(printf,2,0)));
33
extern void audit_log_format(struct audit_buffer *ab,
35
__attribute__((format(printf,2,3)));
36
--- linux-2.6.18.orig/kernel/audit.c
37
+++ linux-2.6.18/kernel/audit.c
38
@@ -954,8 +954,7 @@ static inline int audit_expand(struct au
39
* will be called a second time. Currently, we assume that a printk
40
* can't format message larger than 1024 bytes, so we don't either.
42
-static void audit_log_vformat(struct audit_buffer *ab, const char *fmt,
44
+void audit_log_vformat(struct audit_buffer *ab, const char *fmt, va_list args)
48
@@ -1211,3 +1210,6 @@ EXPORT_SYMBOL(audit_log_start);
49
EXPORT_SYMBOL(audit_log_end);
50
EXPORT_SYMBOL(audit_log_format);
51
EXPORT_SYMBOL(audit_log);
52
+EXPORT_SYMBOL_GPL(audit_log_vformat);
53
+EXPORT_SYMBOL_GPL(audit_log_untrustedstring);
54
+EXPORT_SYMBOL_GPL(audit_log_d_path);