From 4c40011a3b960da423422bff92c9fd9e18a817b3 Mon Sep 17 00:00:00 2001 From: John Johansen Date: Wed, 5 Jun 2019 02:13:00 -0700 Subject: [PATCH] parser: Don't skip cache just because optimizations are specified The parser currently skips the cache if optimizations are specified because it can not determine if the cached policy was compiled with the specified optimization. However this causes cache misses even if policy is cached with those options, and distros are setting some optimizations by default. Instead of skipping reading the cache if optimizations are set, users can force overwriting the cache if needed, until the parser can store aditional meta info in the cache. PR: https://gitlab.com/apparmor/apparmor/merge_requests/385 BugLink: http://bugs.launchpad.net/bugs/1820068 Signed-off-by: John Johansen (cherry picked from commit f6cd5c01c1a5bca947516055543144870f1476b0) --- parser/parser_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/parser/parser_main.c b/parser/parser_main.c index 0e3666b4e..6ec4b6f2d 100644 --- a/parser/parser_main.c +++ b/parser/parser_main.c @@ -518,8 +518,6 @@ static int process_arg(int c, char *optarg) } break; case 'O': - skip_read_cache = 1; - if (!handle_flag_table(optflag_table, optarg, &dfaflags)) { PERROR("%s: Invalid --Optimize option %s\n",