summaryrefslogtreecommitdiffstats
path: root/security/apparmor/policy_unpack.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2013-07-10 21:17:43 -0700
committerJohn Johansen <john.johansen@canonical.com>2013-08-14 11:42:07 -0700
commit556d0be74b19cb6288e5eb2f3216eac247d87968 (patch)
treea97b609d53713c4c2b534da7a5e1e62639939e11 /security/apparmor/policy_unpack.c
parent0d259f043f5f60f74c4fd020aac190cb6450e918 (diff)
downloadop-kernel-dev-556d0be74b19cb6288e5eb2f3216eac247d87968.zip
op-kernel-dev-556d0be74b19cb6288e5eb2f3216eac247d87968.tar.gz
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 cac0aa0..bdaef2e 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)) {
OpenPOWER on IntegriCloud