aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2013-02-18 18:59:34 -0500
committerJohn Johansen <john.johansen@canonical.com>2013-04-28 03:35:04 -0400
commit17322cc3f9ba578f20b5c09fb1630bd234040008 (patch)
tree42c688a31cc21a559b3cb48353be21f9bc31ef1d /security
parentb7ae9f064bec903bd4a9f257a35da4d1e9bbcc99 (diff)
apparmor: fix auditing of domain transition failures due to incomplete policy
When policy specifies a transition to a profile that is not currently loaded, it result in exec being denied. However the failure is not being audited correctly because the audit code is treating this as an allowed permission and thus not reporting it. Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-By: Steve Beattie <sbeattie@ubuntu.com>
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/domain.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 859abdaac1ea..7bc85c7f4573 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -443,6 +443,8 @@ int apparmor_bprm_set_creds(struct linux_binprm *bprm)
443 } else { 443 } else {
444 error = -ENOENT; 444 error = -ENOENT;
445 info = "profile not found"; 445 info = "profile not found";
446 /* remove MAY_EXEC to audit as failure */
447 perms.allow &= ~MAY_EXEC;
446 } 448 }
447 } 449 }
448 } else if (COMPLAIN_MODE(profile)) { 450 } else if (COMPLAIN_MODE(profile)) {