mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-05 08:45:22 +00:00
This adds a recursive include that otherwise parses correctly, to check
that the parser handles one-level recursion loop acceptably. When the
utils can support it, we should have tests that exercise deeper levels
of looping, e.g. include a -> include b -> include c -> include a or
deeper.
Without the fix in
https://gitlab.com/apparmor/apparmor/-/merge_requests/743, the parser
does fail due to hitting its file descriptor limit.
(The test at
https://gitlab.com/apparmor/apparmor/-/blob/master/parser/tst/simple_tests/include_tests/recursive.sd
includes itself, which will result in a recursive profile definition
which isn't accepted by the parser.)
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/743
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit c00b0d325b
)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
7 lines
114 B
Plaintext
7 lines
114 B
Plaintext
|
|
# helper for include_tests/recursive_2.sd
|
|
|
|
/foo rw,
|
|
#include <includes/recursive.include>
|
|
/no/such/path r,
|