mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-04 16:25:10 +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) {
|
} else if (strcmp(ent->name, "protocol") == 0) {
|
||||||
yyerror("socket rule: 'protocol' conditional is not currently supported\n");
|
yyerror("socket rule: 'protocol' conditional is not currently supported\n");
|
||||||
} else if (strcmp(ent->name, "label") == 0) {
|
} else if (strcmp(ent->name, "label") == 0) {
|
||||||
if (peer)
|
if (!peer)
|
||||||
move_conditional_value("unix", &label, ent);
|
move_conditional_value("unix", &label, ent);
|
||||||
else
|
else
|
||||||
move_conditional_value("unix", &peer_label, ent);
|
move_conditional_value("unix", &peer_label, ent);
|
||||||
|
@@ -350,7 +350,7 @@ int unix_rule::gen_policy_re(Profile &prof)
|
|||||||
|
|
||||||
/* peer addr */
|
/* peer addr */
|
||||||
if (peer_path) {
|
if (peer_path) {
|
||||||
if (strcmp(path, "none") == 0) {
|
if (strcmp(peer_path, "none") == 0) {
|
||||||
buffer << "\\x01";
|
buffer << "\\x01";
|
||||||
} else {
|
} else {
|
||||||
/* skip leading @ */
|
/* skip leading @ */
|
||||||
|
Reference in New Issue
Block a user