1
Description: The feature file is not being written to the proper location if
2
the parameter --cache-loc= is specified. This results in using the .features
3
file from /etc/apparmor.d/cache or always recompiling policy.
5
The former case is particularly bad as the .features file in
6
/etc/apparmor.d/cache/ may not correspond to the file in the specified
9
bug: launchpad.net/bugs/1229393
11
Signed-off-by: John Johansen <john.johansen@canonical.com>
12
Acked-by: Tyler Hicks <tyhicks@canonical.com>
13
Origin: commit, revision id: john.johansen@canonical.com-20130929085239-9w7bjjqh60gyf7f9
14
Author: John Johansen <john.johansen@canonical.com>
15
Last-Update: 2013-09-29
16
X-Bzr-Revision-Id: john.johansen@canonical.com-20130929085239-9w7bjjqh60gyf7f9
18
Index: apparmor-2.8.0/parser/parser_main.c
19
===================================================================
20
--- apparmor-2.8.0.orig/parser/parser_main.c 2013-09-30 16:11:05.531825177 -0700
21
+++ apparmor-2.8.0/parser/parser_main.c 2013-09-30 16:11:05.519825177 -0700
22
@@ -1171,6 +1171,7 @@ static void setup_flags(void)
24
char *cache_features_path = NULL;
25
char *cache_flags = NULL;
28
/* Get the match string to determine type of regex support needed */
30
@@ -1192,7 +1193,11 @@ static void setup_flags(void)
31
* - If cache/.features exists, and does not match flags_string,
32
* force cache reading/writing off.
34
- if (asprintf(&cache_features_path, "%s/cache/.features", basedir) == -1) {
36
+ rc = asprintf(&cache_features_path, "%s/.features", cacheloc);
38
+ rc = asprintf(&cache_features_path, "%s/cache/.features", basedir);