diff options
author | Mike Salvatore <mike.salvatore@canonical.com> | 2020-03-30 23:43:29 +0300 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2022-10-04 00:49:02 +0300 |
commit | 408d53e923bd852d5d80243a642004163db53a87 (patch) | |
tree | 9c3b52675bc86ff7dde78510078f199443642144 /security/apparmor/apparmorfs.c | |
parent | 2218d08123362c63bab257caf5ec3bc1a6e87ae9 (diff) | |
download | linux-408d53e923bd852d5d80243a642004163db53a87.tar.xz |
apparmor: compute file permissions on profile load
Rather than computing file permissions for each file access, file
permissions can be computed once on profile load and stored for lookup.
Signed-off-by: Mike Salvatore <mike.salvatore@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/apparmorfs.c')
-rw-r--r-- | security/apparmor/apparmorfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c index 044affb1ce83..825b3093dcdd 100644 --- a/security/apparmor/apparmorfs.c +++ b/security/apparmor/apparmorfs.c @@ -624,7 +624,7 @@ static void profile_query_cb(struct aa_profile *profile, struct aa_perms *perms, if (state) { struct path_cond cond = { }; - tmp = aa_compute_fperms(dfa, state, &cond); + tmp = *(aa_lookup_fperms(&(profile->file), state, &cond)); } } else if (profile->policy.dfa) { if (!PROFILE_MEDIATES(profile, *match_str)) |