mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Rev 2203 (rev 2097 on the 2.8 branch) created a regression such that
cache files will be written out even if the '--skip-bad-cache' option is given and the cached features file differs from the features of the currently running kernel. The patch below fixes the regression. From: John Johansen <john.johansen@canonical.com> Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
parent
3d8c3806e2
commit
19a1f0aa8c
1 changed files with 2 additions and 2 deletions
|
@ -1272,7 +1272,7 @@ static int create_cache(const char *cachedir, const char *path,
|
||||||
struct stat stat_file;
|
struct stat stat_file;
|
||||||
FILE * f = NULL;
|
FILE * f = NULL;
|
||||||
|
|
||||||
if (cond_clear_cache && clear_cache_files(cacheloc) != 0)
|
if (clear_cache_files(cacheloc) != 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
create_file:
|
create_file:
|
||||||
|
@ -1347,7 +1347,7 @@ static void setup_flags(void)
|
||||||
get_flags_string(&cache_flags, cache_features_path);
|
get_flags_string(&cache_flags, cache_features_path);
|
||||||
if (cache_flags) {
|
if (cache_flags) {
|
||||||
if (strcmp(flags_string, cache_flags) != 0) {
|
if (strcmp(flags_string, cache_flags) != 0) {
|
||||||
if (write_cache) {
|
if (write_cache && cond_clear_cache) {
|
||||||
if (create_cache(cacheloc, cache_features_path,
|
if (create_cache(cacheloc, cache_features_path,
|
||||||
flags_string))
|
flags_string))
|
||||||
skip_read_cache = 1;
|
skip_read_cache = 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue