mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 01:57:43 +00:00
Use mtime instead of ctime for cache file
When caching was converted to use mtime instead of ctime, the cache file timestamp did not get switched over. This means we are comparing the cache file's ctime against the policy file's mtime. Which can make the cache look newer than it really is. Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Seth Arnold <seth.arnold@canonical.com>
This commit is contained in:
parent
69868cda18
commit
c2bbe64ab1
@ -109,7 +109,7 @@ void valid_read_cache(const char *cachename)
|
||||
if (stat(cachename, &stat_bin) == 0 &&
|
||||
stat_bin.st_size > 0) {
|
||||
if (valid_cached_file_version(cachename))
|
||||
set_mru_tstamp(stat_bin.st_ctim);
|
||||
set_mru_tstamp(stat_bin.st_mtim);
|
||||
else if (!cond_clear_cache)
|
||||
write_cache = 0;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user