[apparmor] [PATCH 09/24] apparmor: fix fs extry display for default profile

John Johansen john.johansen at canonical.com
Wed Feb 27 18:14:08 UTC 2013


The default profile needs its replaced by information set as its on
the profile list and will have an fs interface (and the fs interface
files require a valid replacedby).

Signed-off-by: John Johansen <john.johansen at canonical.com>
---
 security/apparmor/policy.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
index 54fbe5d..d6ffb5b 100644
--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -769,6 +769,9 @@ struct aa_profile *aa_setup_default_profile(void)
 
 	profile->ns = aa_get_namespace(root_ns);
 
+	/* replacedby being set needed by fs interface */
+	rcu_assign_pointer(profile->replacedby->profile,
+			   aa_get_profile(profile));
 	__list_add_profile(&root_ns->base.profiles, profile);
 
 	return profile;
-- 
1.7.10.4




More information about the AppArmor mailing list