2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 06:16:03 +00:00

parser: Add policy cache function for cache removal

This function allows for a policy cache to be removed without having a
previously instatiated aa_policy_cache object. It simply works off of a
path.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Tyler Hicks
2015-03-25 17:09:26 -05:00
parent f0fcf23231
commit 8553727414
3 changed files with 14 additions and 8 deletions

View File

@@ -916,7 +916,7 @@ int main(int argc, char *argv[])
}
if (force_clear_cache) {
if (clear_cache_files(cacheloc)) {
if (aa_policy_cache_remove(cacheloc)) {
PERROR(_("Failed to clear cache files (%s): %s\n"),
cacheloc, strerror(errno));
return 1;