summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/apparmor-modules/files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch')
-rw-r--r--sys-apps/apparmor-modules/files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/sys-apps/apparmor-modules/files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch b/sys-apps/apparmor-modules/files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch
new file mode 100644
index 0000000..c0e97bb
--- /dev/null
+++ b/sys-apps/apparmor-modules/files/apparmor-modules-2.0_2.6.17.9_symbol_export.patch
@@ -0,0 +1,83 @@
+From: tonyj@suse.de
+Subject: Export namespace semaphore
+Patch-mainline: no
+
+Export global namespace_sem (this used to be a per namespace semaphore).
+Alas, this isn't going to win _any_ points for style.
+Patch is not in mainline -- pending AppArmor code submission to lkml
+
+---
+--- linux-2.6.17.9.orig/fs/namespace.c
++++ linux-2.6.17.9/fs/namespace.c
+@@ -46,7 +46,8 @@ static int event;
+ static struct list_head *mount_hashtable __read_mostly;
+ static int hash_mask __read_mostly, hash_bits __read_mostly;
+ static kmem_cache_t *mnt_cache __read_mostly;
+-static struct rw_semaphore namespace_sem;
++struct rw_semaphore namespace_sem;
++EXPORT_SYMBOL_GPL(namespace_sem);
+
+ /* /sys/fs */
+ decl_subsys(fs, NULL, NULL);
+--- linux-2.6.17.9.orig/include/linux/namespace.h
++++ linux-2.6.17.9/include/linux/namespace.h
+@@ -5,6 +5,9 @@
+ #include <linux/mount.h>
+ #include <linux/sched.h>
+
++/* exported for AppArmor (SubDomain) */
++extern struct rw_semaphore namespace_sem;
++
+ struct namespace {
+ atomic_t count;
+ struct vfsmount * root;
+
+
+From: tonyj@suse.de
+Subject: Export audit subsystem for use by modules
+Patch-mainline: no
+
+Adds necessary export symbols for audit subsystem routines.
+Changes audit_log_vformat to be externally visible (analagous to vprintf)
+Patch is not in mainline -- pending AppArmor code submission to lkml
+
+--- linux-2.6.17.9.orig/include/linux/audit.h
++++ linux-2.6.17.9/include/linux/audit.h
+@@ -96,6 +96,8 @@
+ #define AUDIT_LAST_KERN_ANOM_MSG 1799
+ #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */
+
++#define AUDIT_SD 1500 /* AppArmor (SubDomain) audit */
++
+ #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */
+
+ /* Rule flags */
+@@ -357,6 +359,9 @@ extern void audit_log(struct audit_
+ __attribute__((format(printf,4,5)));
+
+ extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
++extern void audit_log_vformat(struct audit_buffer *ab,
++ const char *fmt, va_list args)
++ __attribute__((format(printf,2,0)));
+ extern void audit_log_format(struct audit_buffer *ab,
+ const char *fmt, ...)
+ __attribute__((format(printf,2,3)));
+--- linux-2.6.17.9.orig/kernel/audit.c
++++ linux-2.6.17.9/kernel/audit.c
+@@ -893,8 +893,7 @@ static inline int audit_expand(struct au
+ * will be called a second time. Currently, we assume that a printk
+ * can't format message larger than 1024 bytes, so we don't either.
+ */
+-static void audit_log_vformat(struct audit_buffer *ab, const char *fmt,
+- va_list args)
++void audit_log_vformat(struct audit_buffer *ab, const char *fmt, va_list args)
+ {
+ int len, avail;
+ struct sk_buff *skb;
+@@ -1096,3 +1095,6 @@ EXPORT_SYMBOL(audit_log_start);
+ EXPORT_SYMBOL(audit_log_end);
+ EXPORT_SYMBOL(audit_log_format);
+ EXPORT_SYMBOL(audit_log);
++EXPORT_SYMBOL_GPL(audit_log_vformat);
++EXPORT_SYMBOL_GPL(audit_log_untrustedstring);
++EXPORT_SYMBOL_GPL(audit_log_d_path);