[apparmor] [PATCH] Fix broken -n parameter
John Johansen
john.johansen at canonical.com
Thu Feb 11 14:56:17 UTC 2016
Commit -r 2934
Add fns to handle profile removal to the kernel interface
broke use of the -n parameter unless a namespace was specified with the
profile.
Signed-off-by: John Johansen <john.johansen at canonical.com>
---
parser/parser_yacc.y | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/parser/parser_yacc.y b/parser/parser_yacc.y
index d17eab9..d39ffbf 100644
--- a/parser/parser_yacc.y
+++ b/parser/parser_yacc.y
@@ -357,7 +357,9 @@ profile: opt_profile_flag opt_ns profile_base
prof->ns = strdup(profile_ns);
if (!prof->ns)
yyerror(_("Memory allocation error."));
- } else
+ } else if (profile_ns)
+ prof->ns = strdup(profile_ns);
+ else
prof->ns = $2;
if ($1 == 2)
prof->flags.hat = 1;
--
2.7.0
More information about the AppArmor
mailing list