[apparmor] [PATCH 36/36] apparmor: fix returning -einval when should be no perms on query interface
John Johansen
john.johansen at canonical.com
Wed May 1 21:31:21 UTC 2013
Signed-off-by: John Johansen <john.johansen at canonical.com>
---
security/apparmor/apparmorfs.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 5121596..b637ea9 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -249,8 +249,10 @@ static ssize_t query_label(char *buf, size_t buf_len,
audit |= dfa_user_audit(profile->policy.dfa, state);
quiet |= dfa_user_quiet(profile->policy.dfa, state);
} else {
- aa_put_label(label);
- return -EINVAL;
+ /* TODO: do we want to accumulate audit/quiet
+ or just clear as currently doing */
+ allow = audit = quiet = 0;
+ break;
}
}
aa_put_label(label);
--
1.8.1.2
More information about the AppArmor
mailing list