mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 10:07:12 +00:00
parser: split newline and end of rule handling into separate rules
Split the newline processing into a separate rule block so that it can be shared with states that need to process newlines without processing end of rule conditions. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/569 Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Steve Beattie <sbeattie@ubuntu.com>
This commit is contained in:
parent
1a4288886b
commit
fffca2ffa0
@ -476,6 +476,7 @@ GT >
|
||||
\\\n { DUMP_PREPROCESS; current_lineno++ ; }
|
||||
|
||||
\r?\n {
|
||||
/* don't use shared rule because we need POP() here */
|
||||
DUMP_PREPROCESS;
|
||||
current_lineno++;
|
||||
POP();
|
||||
@ -702,8 +703,10 @@ include/{WS} {
|
||||
POP_NODUMP();
|
||||
RETURN_TOKEN(TOK_END_OF_RULE);
|
||||
}
|
||||
}
|
||||
|
||||
\r?\n {
|
||||
<INITIAL,NETWORK_MODE,RLIMIT_MODE,CHANGE_PROFILE_MODE,MOUNT_MODE,DBUS_MODE,SIGNAL_MODE,PTRACE_MODE,UNIX_MODE,ABI_MODE>{
|
||||
\r?\n {
|
||||
DUMP_PREPROCESS;
|
||||
current_lineno++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user