mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 13:58:22 +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:
committed by
Tyler Hicks
parent
2b240461a7
commit
c85bca38f5
@@ -966,8 +966,14 @@ int process_profile(int option, const char *profilename)
|
|||||||
stat_bin.st_size > 0) {
|
stat_bin.st_size > 0) {
|
||||||
if (valid_cached_file_version(cachename))
|
if (valid_cached_file_version(cachename))
|
||||||
set_mru_tstamp(stat_bin.st_ctim);
|
set_mru_tstamp(stat_bin.st_ctim);
|
||||||
} else if (debug_cache)
|
else if (!cond_clear_cache)
|
||||||
pwarn("%s: Invalid or missing cache file '%s'\n", progname, cachename);
|
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user