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:
@@ -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);
|
||||
|
@@ -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 @ */
|
||||
|
Reference in New Issue
Block a user