mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
parser: Fix parsing of arrow “px -> …”
The parser failed to read the profile name after the the arrow. Rules with
`-> foo-bar;` failed with “Found unexpected character: '-'”. Rules with
`-> @{tgt};` compiled fine, but failed at runtime with “profile transition
not found”.
The patch was written by sbeattie and published on
https://paste.ubuntu.com/p/tzxxmVwGJ8/
https://matrix.to/#/!pNJIrowvqsuGgjXsEY:matrix.org/$15477566201815716pmube:matrix.org?via=matrix.org&via=alea.gnuu.de
PR: https://gitlab.com/apparmor/apparmor/merge_requests/334
(cherry picked from commit 0e0663e99e
)
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
committed by
John Johansen
parent
4c40011a3b
commit
2d2dc42aa6
@@ -605,7 +605,7 @@ include/{WS} {
|
||||
|
||||
{CARET} { PUSH_AND_RETURN(SUB_ID, TOK_CARET); }
|
||||
|
||||
{ARROW} { RETURN_TOKEN(TOK_ARROW); }
|
||||
{ARROW} { PUSH_AND_RETURN(SUB_ID_WS, TOK_ARROW); }
|
||||
|
||||
{EQUALS} { PUSH_AND_RETURN(ASSIGN_MODE, TOK_EQUALS); }
|
||||
|
||||
|
Reference in New Issue
Block a user