mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
parser: Lift force_clear_cache handling from setup_cache()
This keeps us from having to use the force_clear_cache global in policy_cache.c. Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -914,6 +914,16 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (force_clear_cache) {
|
||||
if (clear_cache_files(cacheloc)) {
|
||||
PERROR(_("Failed to clear cache files (%s): %s\n"),
|
||||
cacheloc, strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
retval = setup_cache(cacheloc);
|
||||
if (retval) {
|
||||
PERROR(_("Failed setting up policy cache (%s): %s\n"),
|
||||
|
Reference in New Issue
Block a user