[apparmor] [PATCH 27/43] apparmor: fix fs extry display for default profile

John Johansen john.johansen at canonical.com
Fri Feb 8 21:01:03 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 |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
index d664557..b4f7514 100644
--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -770,6 +770,8 @@ struct aa_profile *aa_setup_default_profile(void)
 
 	/* list ref */
 	aa_get_profile(profile);
+	/* replacedby being set needed by fs interface */
+	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