[apparmor] [Patch][parser] Convert cache to using mtime

John Johansen john.johansen at canonical.com
Tue Jun 17 04:39:17 UTC 2014

Convert cache to using mtime

For some strange reason our caching use ctime instead of mtime.
However this can lead to odd cases of the cache missing even though
neither the profile data nor cache data have changed.

Signed-off-by: John Johansen <john.johansen at canonical.com>

 parser/parser_main.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- 2.9-test.orig/parser/parser_main.c
+++ 2.9-test/parser/parser_main.c
@@ -840,8 +840,8 @@
 	struct stat stat_file;
 	if (fstat(fileno(file), &stat_file))
-	if (mru_t_cmp(stat_file.st_ctim))
-		mru_tstamp = stat_file.st_ctim;
+	if (mru_t_cmp(stat_file.st_mtim))
+		mru_tstamp = stat_file.st_mtim;
 int process_profile(int option, const char *profilename)

More information about the AppArmor mailing list