On Fri, Jun 05, 2015 at 03:24:22PM -0700, John Johansen wrote: > For cache file. For some inexplicable reason when we converted the > cache to use mtime, the timestamp used from the cache file never > got switched from ctime to mtime. > > The means we are comparing the cache files ctime against the policy > files mtime. Which can make the cache look newer than it really > is. > > Signed-off-by: John Johansen <john.johan...@canonical.com>
Acked-by: Seth Arnold <seth.arn...@canonical.com> Thanks > --- > parser/policy_cache.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/parser/policy_cache.c b/parser/policy_cache.c > index fc4912e..65829a6 100644 > --- a/parser/policy_cache.c > +++ b/parser/policy_cache.c > @@ -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 { > --
signature.asc
Description: Digital signature
-- AppArmor mailing list AppArmor@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor