2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 01:57:43 +00:00

The preprocessing output is broken, in a couple of places

includes come out like

  #include 

  ##included <tunables/home>

which is wrong because #include by itself is broken, and since -p is
supposed to be removing includes, it should not be directly echoed

any keyword in the keyword table is double echoed

  ownerowner /{run,dev}/shm/pulse-shm* rwk


Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
John Johansen 2014-02-02 19:23:10 -10:00
parent 19038d063b
commit 572fe066da

View File

@ -488,7 +488,12 @@ LT_EQUAL <=
}
}
#include/.*\r?\n { PUSH(INCLUDE); }
#include/.*\r?\n {
/* Don't use push here as we don't want #include echoed out. It needs
* to be handled specially
*/
yy_push_state(INCLUDE);
}
#.*\r?\n { /* normal comment */
DUMP_AND_DEBUG("comment(%d): %s\n", current_lineno, yytext);
@ -536,7 +541,6 @@ LT_EQUAL <=
{OPEN_PAREN} { PUSH_AND_RETURN(LIST_VAL_MODE, TOK_OPENPAREN); }
{VARIABLE_NAME} {
DUMP_PREPROCESS;
int token = get_keyword_token(yytext);
int state = INITIAL;