apparmor/parser
Steve Beattie c00b0d325b parser: add a simple one-level recursive include test
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>
2021-04-27 20:27:33 -07:00
..
libapparmor_re parser: replace dynamic_cast with is_type method 2021-02-16 10:23:10 +01:00
po translations: update generated pot files 2020-10-14 03:56:38 -07:00
tst parser: add a simple one-level recursive include test 2021-04-27 20:27:33 -07:00
aa-teardown aa-teardown: Replace /bin/bash with /bin/sh 2018-05-05 17:46:19 -07:00
aa-teardown.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
af_rule.cc treewide: spelling/typo fixes in comments and docs 2020-12-01 12:47:11 -08:00
af_rule.h C tools: rename __unused macro to unused 2014-10-02 12:58:54 -07:00
af_unix.cc parser: fix rule downgrade for unix rules 2021-03-14 07:16:24 -07:00
af_unix.h parser: replace duplicate warn_once() with common function 2020-08-09 17:56:31 -04:00
apparmor.d.pod Improve AARE documentation in apparmor.d manpage 2021-03-01 19:40:50 +01:00
apparmor.pod man: apparmor.7 add info about complain mode and kernel parameters 2021-03-15 15:24:43 -07:00
apparmor.service Adjust cache paths in apparmor.service 2018-06-16 23:14:19 +02:00
apparmor.systemd parser/apparmor.systemd: fix minor issues detected by shellcheck 2018-12-21 19:50:10 +01:00
apparmor_parser.pod parser: fix --jobs so job scaling is applied correctly 2021-02-10 19:06:26 -08:00
apparmor_xattrs.pod apparmor_xattrs.7: fix whatis entry 2020-10-25 11:54:47 +00:00
base_cap_names.h parser: Add support for CAP_CHECKPOINT_RESTORE 2020-10-13 21:30:19 -07:00
capability.h parser: Add support for CAP_CHECKPOINT_RESTORE 2020-10-13 21:30:19 -07:00
common_optarg.c parser: cleanup/fix flagtable display for the warn, dump, and Optimize options 2020-09-01 19:42:38 -07:00
common_optarg.h parser: add the ability to print what flags are set in option flag tables 2020-09-01 19:42:38 -07:00
COPYING.GPL rpmlint complains about an outdated FSF address in parser/COPYING.GPL. 2011-11-27 13:52:06 +01:00
dbus.cc parser: call filter slashes for the dbus path conditional 2020-09-29 04:14:35 -07:00
dbus.h parser: replace duplicate warn_once() with common function 2020-08-09 17:56:31 -04:00
default_features.c parser: Move to a pre-generated cap_names.h 2020-07-07 09:43:48 -07:00
file_cache.h parser: add include dedup cache to handle include loops 2021-04-27 20:26:57 -07:00
frob_slack_rc as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
immunix.h parser: convert commented out fprintf() in immunix.h to PDEBUG() 2020-09-05 09:38:53 -04:00
lib.c libapparmor: Use directory file descriptor in _aa_dirat_for_each() 2015-06-15 15:11:51 -05:00
lib.h libapparmor: Use directory file descriptor in _aa_dirat_for_each() 2015-06-15 15:11:51 -05:00
Makefile parser: add include dedup cache to handle include loops 2021-04-27 20:26:57 -07:00
mount.cc treewide: spelling/typo fixes in code strings 2020-12-01 12:47:18 -08:00
mount.h parser: replace duplicate warn_once() with common function 2020-08-09 17:56:31 -04:00
network.c Use the gcc cleanup extension attribute to handle closing temp files 2015-03-25 17:09:26 -05:00
network.h parser: add support for kernel 4.17 v8 networking 2020-09-29 03:33:55 -07:00
parser.conf treewide: spelling/typo fixes in comments and docs 2020-12-01 12:47:11 -08:00
parser.h parser: add include dedup cache to handle include loops 2021-04-27 20:26:57 -07:00
parser_alias.c parser: provide typedefs for comparison_fn_t and __free_fn_t 2018-05-09 13:15:42 -07:00
parser_common.c parser: add include dedup cache to handle include loops 2021-04-27 20:26:57 -07:00
parser_include.c parser: add include dedup cache to handle include loops 2021-04-27 20:26:57 -07:00
parser_include.h parser: add include dedup cache to handle include loops 2021-04-27 20:26:57 -07:00
parser_interface.c treewide: spelling/typo fixes in comments and docs 2020-12-01 12:47:11 -08:00
parser_lex.l parser: add include dedup cache to handle include loops 2021-04-27 20:26:57 -07:00
parser_main.c parser: add include dedup cache to handle include loops 2021-04-27 20:26:57 -07:00
parser_merge.c parser: Stop splitting the namespace from the named transition targets 2016-03-18 17:28:51 -05:00
parser_misc.c parser: don't abort profile compile if the kernel is missing caps/mask 2020-12-11 04:01:40 -08:00
parser_policy.c parser: Fix MR625 to emit proc attr access for all situations 2020-09-17 19:28:23 -07:00
parser_regex.c parser: fix filter slashes for link targets 2021-03-15 00:45:58 -07:00
parser_symtab.c treewide: spelling/typo fixes in code strings 2020-12-01 12:47:18 -08:00
parser_variable.c parser: fix memory leaks in unit tests 2016-01-25 12:05:50 -08:00
parser_yacc.y parser: add include dedup cache to handle include loops 2021-04-27 20:26:57 -07:00
policy_cache.c Fix wording of some warnings 2020-10-11 12:22:23 +02:00
policy_cache.h drop unused extern int debug_cache 2021-02-07 16:02:20 +01:00
policydb.h parser: add support for kernel 4.17 v8 networking 2020-09-29 03:33:55 -07:00
profile.cc parser: support enforce, kill and unconfined profile modes 2020-06-10 05:35:37 -07:00
profile.h parser: Use the kernel and policy abis to detect new capabilities 2020-07-07 09:43:48 -07:00
ptrace.cc parser: replace duplicate warn_once() with common function 2020-08-09 17:56:31 -04:00
ptrace.h parser: replace duplicate warn_once() with common function 2020-08-09 17:56:31 -04:00
rc.apparmor.debian as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
rc.apparmor.functions init: Add note about snapd policy and early boot to rc.apparmor.functions 2020-09-22 12:23:17 -07:00
rc.apparmor.redhat as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
rc.apparmor.slackware added missing functions to slackware init script 2019-11-08 13:49:48 +01:00
README README: Move project contact info into the main README 2018-09-13 16:54:09 +00:00
README.devel parser: add some developer documentation 2013-12-10 14:15:02 -08:00
rule.cc parser: replace duplicate warn_once() with common function 2020-08-09 17:56:31 -04:00
rule.h parser: replace duplicate warn_once() with common function 2020-08-09 17:56:31 -04:00
signal.cc treewide: spelling/typo fixes in comments and docs 2020-12-01 12:47:11 -08:00
signal.h parser: replace duplicate warn_once() with common function 2020-08-09 17:56:31 -04:00
techdoc.tex treewide: spelling/typo fixes in comments and docs 2020-12-01 12:47:11 -08:00
unit_test.h Convert codomain to a class 2013-09-27 16:16:37 -07:00

The apparmor_parser allows you to add, replace, and remove AppArmor
policy through the use of command line options. The default is to add.
`apparmor_parser --help` shows what the command line options are.

You can also find more information at https://wiki.apparmor.net

-- The AppArmor development team