mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
parser: Fix segfault in af_unix rule processing
This patch fixes a segfault that was occurring in testing over the weekend. The problem existed in the original patch that adds af_unix rules (lp:apparmor commit 2615). Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -83,7 +83,7 @@ void unix_rule::move_peer_conditionals(struct cond_entry *conds)
|
||||
}
|
||||
if (strcmp(ent->name, "addr") == 0) {
|
||||
move_conditional_value("unix", &peer_addr, ent);
|
||||
if (peer_addr[0] != '@' && strcmp(addr, "none") != 0)
|
||||
if (peer_addr[0] != '@' && strcmp(peer_addr, "none") != 0)
|
||||
yyerror("unix rule: invalid value for addr='%s'\n", peer_addr);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user