[apparmor] [Patch] [2.8] Fix caching failure due to features cache being larger than read buffer

John Johansen john.johansen at canonical.com
Wed Mar 13 00:32:54 UTC 2013


This is a minimal fix to apparmor 2.8 for cache failures when the feature
file is larger than the feature buffer used for cache version comparison.

Ideally this would be dynamically allocated but for 2.8 just bumping the
buffer size is the quick fix.

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


=== modified file 'parser/parser_main.c'
--- parser/parser_main.c	2013-01-04 00:12:20 +0000
+++ parser/parser_main.c	2013-03-12 01:54:55 +0000
@@ -78,7 +78,7 @@
 int skip_mode_force = 0;
 struct timespec mru_tstamp;
 
-#define FLAGS_STRING_SIZE 1024
+#define FLAGS_STRING_SIZE 4096
 char *match_string = NULL;
 char *flags_string = NULL;
 char *cacheloc = NULL;




More information about the AppArmor mailing list