summaryrefslogtreecommitdiff
path: root/security/apparmor/domain.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2020-11-14 03:30:47 +0300
committerJohn Johansen <john.johansen@canonical.com>2022-10-04 00:49:02 +0300
commite48ffd24c1d87dba227225615790cd059a707adb (patch)
tree3778d8db5cc54bad9a8abe60578066b1983a46d8 /security/apparmor/domain.c
parent0310f093ba95e7640c886298de36560c123df5bd (diff)
downloadlinux-e48ffd24c1d87dba227225615790cd059a707adb.tar.xz
apparmor: convert xmatch to use aa_perms structure
Convert xmatch from using perms encoded in the accept entry of the dfa to the common external aa_perms in a table. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/domain.c')
-rw-r--r--security/apparmor/domain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 22351b6d71e6..4fcdcc0de48c 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -339,7 +339,7 @@ static int aa_xattrs_match(const struct linux_binprm *bprm,
/* Check xattr value */
state = aa_dfa_match_len(profile->xmatch, state, value,
size);
- perm = profile->xmatch_perms[state];
+ perm = profile->xmatch_perms[state].allow;
if (!(perm & MAY_EXEC)) {
ret = -EINVAL;
goto out;
@@ -419,7 +419,7 @@ restart:
state = aa_dfa_leftmatch(profile->xmatch, DFA_START,
name, &count);
- perm = profile->xmatch_perms[state];
+ perm = profile->xmatch_perms[state].allow;
/* any accepting state means a valid match. */
if (perm & MAY_EXEC) {
int ret = 0;