[apparmor] [PATCH] Fix compiling with DEBUG flag set
John Johansen
john.johansen at canonical.com
Thu Sep 1 18:09:03 UTC 2011
Signed-off-by: John Johansen <john.johansen at canonical.com>
---
parser/Makefile | 2 +-
parser/parser_yacc.y | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/parser/Makefile b/parser/Makefile
index f64207d..a98fba8 100644
--- a/parser/Makefile
+++ b/parser/Makefile
@@ -49,7 +49,7 @@ ifndef CFLAGS
CFLAGS = -g -O2 -pipe
ifdef DEBUG
-CFLAGS += -pg
+CFLAGS += -pg -D DEBUG
endif
endif #CFLAGS
diff --git a/parser/parser_yacc.y b/parser/parser_yacc.y
index 05e6c17..78e9230 100644
--- a/parser/parser_yacc.y
+++ b/parser/parser_yacc.y
@@ -240,7 +240,7 @@ profile_base: TOK_ID opt_id flags TOK_OPEN rules TOK_CLOSE
post_process_nt_entries(cod);
PDEBUG("%s: flags='%s%s'\n",
- $3,
+ $2,
cod->flags.complain ? "complain, " : "",
cod->flags.audit ? "audit" : "");
@@ -280,7 +280,7 @@ hat: hat_start profile_base
{
struct codomain *cod = $2;
if ($2)
- PDEBUG("Matched: hat %s { ... }\n", code->name);
+ PDEBUG("Matched: hat %s { ... }\n", cod->name);
cod->flags.hat = 1;
$$ = cod;
@@ -384,7 +384,7 @@ valuelist: valuelist TOK_VALUE
struct value_list *new = calloc(1, sizeof(struct value_list));
if (!new)
yyerror(_("Memory allocation error."));
- PDEBUG("Matched: value (%s)\n", $1);
+ PDEBUG("Matched: value list\n");
new->value = $2;
new->next = $1;
--
1.7.5.4
More information about the AppArmor
mailing list