summaryrefslogtreecommitdiffstats
path: root/security/apparmor/policy_unpack.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2013-07-11 06:17:43 +0200
committerJohn Johansen <john.johansen@canonical.com>2013-08-14 20:42:07 +0200
commit556d0be74b19cb6288e5eb2f3216eac247d87968 (patch)
treea97b609d53713c4c2b534da7a5e1e62639939e11 /security/apparmor/policy_unpack.c
parentapparmor: add interface files for profiles and namespaces (diff)
downloadlinux-556d0be74b19cb6288e5eb2f3216eac247d87968.tar.xz
linux-556d0be74b19cb6288e5eb2f3216eac247d87968.zip
apparmor: add an optional profile attachment string for profiles
Add the ability to take in and report a human readable profile attachment string for profiles so that attachment specifications can be easily inspected. Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Seth Arnold <seth.arnold@canonical.com>
Diffstat (limited to 'security/apparmor/policy_unpack.c')
-rw-r--r--security/apparmor/policy_unpack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
index cac0aa075787..bdaef2e1b2a0 100644
--- a/security/apparmor/policy_unpack.c
+++ b/security/apparmor/policy_unpack.c
@@ -492,6 +492,9 @@ static struct aa_profile *unpack_profile(struct aa_ext *e)
/* profile renaming is optional */
(void) unpack_str(e, &profile->rename, "rename");
+ /* attachment string is optional */
+ (void) unpack_str(e, &profile->attach, "attach");
+
/* xmatch is optional and may be NULL */
profile->xmatch = unpack_dfa(e);
if (IS_ERR(profile->xmatch)) {