2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

parser: fix logic error and incorrect reference from previous commit

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Steve Beattie
2014-09-03 13:34:10 -07:00
parent dd44858e60
commit 019de74059
2 changed files with 2 additions and 2 deletions

View File

@@ -80,7 +80,7 @@ int af_rule::move_base_cond(struct cond_entry *ent, bool peer)
} else if (strcmp(ent->name, "protocol") == 0) {
yyerror("socket rule: 'protocol' conditional is not currently supported\n");
} else if (strcmp(ent->name, "label") == 0) {
if (peer)
if (!peer)
move_conditional_value("unix", &label, ent);
else
move_conditional_value("unix", &peer_label, ent);

View File

@@ -350,7 +350,7 @@ int unix_rule::gen_policy_re(Profile &prof)
/* peer addr */
if (peer_path) {
if (strcmp(path, "none") == 0) {
if (strcmp(peer_path, "none") == 0) {
buffer << "\\x01";
} else {
/* skip leading @ */