mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 05:47:59 +00:00
fix cache write to not happen when skip-bad-cache is specified
Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Tyler Hicks <tyhicks@canonical.com>
This commit is contained in:
parent
2b240461a7
commit
c85bca38f5
@ -966,8 +966,14 @@ int process_profile(int option, const char *profilename)
|
||||
stat_bin.st_size > 0) {
|
||||
if (valid_cached_file_version(cachename))
|
||||
set_mru_tstamp(stat_bin.st_ctim);
|
||||
} else if (debug_cache)
|
||||
pwarn("%s: Invalid or missing cache file '%s'\n", progname, cachename);
|
||||
else if (!cond_clear_cache)
|
||||
write_cache = 0;
|
||||
} else {
|
||||
if (!cond_clear_cache)
|
||||
write_cache = 0;
|
||||
if (debug_cache)
|
||||
pwarn("%s: Invalid or missing cache file '%s' (%s)\n", progname, cachename, strerror(errno));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user