summaryrefslogtreecommitdiffstats
path: root/security/apparmor/domain.c
diff options
context:
space:
mode:
authorJohn Johansen2017-06-10 00:48:20 +0200
committerJohn Johansen2017-06-11 02:11:43 +0200
commit98c3d182321d489d8bfaa596127020ec3027edb2 (patch)
tree65370e360b436d6f4e478ae46444ae82a6ccf951 /security/apparmor/domain.c
parentapparmor: move aa_file_perm() to use labels (diff)
downloadkernel-qcow2-linux-98c3d182321d489d8bfaa596127020ec3027edb2.tar.gz
kernel-qcow2-linux-98c3d182321d489d8bfaa596127020ec3027edb2.tar.xz
kernel-qcow2-linux-98c3d182321d489d8bfaa596127020ec3027edb2.zip
apparmor: update aa_audit_file() to use labels
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/domain.c')
-rw-r--r--security/apparmor/domain.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index fab8923ae38e..896bca01828e 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -518,6 +518,7 @@ x_clear:
audit:
error = aa_audit_file(profile, &perms, OP_EXEC, MAY_EXEC, name,
new_profile ? new_profile->base.hname : NULL,
+ new_profile ? &new_profile->label : NULL,
cond.uid, info, error);
cleanup:
@@ -694,7 +695,7 @@ int aa_change_hat(const char *hats[], int count, u64 token, int flags)
audit:
if (!(flags & AA_CHANGE_TEST))
error = aa_audit_file(profile, &perms, OP_CHANGE_HAT,
- AA_MAY_CHANGEHAT, NULL, target,
+ AA_MAY_CHANGEHAT, NULL, target, NULL,
GLOBAL_ROOT_UID, info, error);
out:
@@ -802,7 +803,8 @@ int aa_change_profile(const char *fqname, int flags)
audit:
if (!(flags & AA_CHANGE_TEST))
error = aa_audit_file(profile, &perms, op, request, NULL,
- fqname, GLOBAL_ROOT_UID, info, error);
+ fqname, NULL, GLOBAL_ROOT_UID, info,
+ error);
aa_put_profile(target);
aa_put_label(label);