apparmor/parser
Steve Beattie a67d9be5a2 parser: add implicit set variable @{profile_name} to profile symbol
table

This patch adds the creation of an implicit set variable
@{profile_name} for use within policy. It expands to:

  - a given profile name if specified; e.g. for
      'profile flappy_bird /some/pattern/match* { [...] }'
    @{profile_name} would expand to 'flappy_bird'
  - if no given name, the match pattern; e.g. for
      '/usr/bin/doge_bird { [...] }'
    @{profile_name} would expand to '/usr/bin/doge_bird'
  - hats and child profiles will include the fully qualified name; e.g.
    the 'doge' hat in the /usr/bin/flappy_bird profile would cause
    @{profile_name} to expand to '/usr/bin/flappy_bird//doge' within the
    'doge' hat, and '/usr/bin/flappy_bird' outside of it in the profile.

There are some parsing tests added, but more tests are needed to verify
that expansion occurs properly (I've verified manually using parser
dumps of the added tests, but automated checks are needed).

The @{profile_name} variable is expected to be most useful in the
context of signal and ptrace rules (e.g. for specifying that an app
can send itself signals).

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-04-23 16:38:29 -07:00
..
libapparmor_re Convert aare_rules into a class 2014-04-23 10:57:16 -07:00
po Launchpad automatic translations update. 2014-01-22 05:15:04 +00:00
tst parser: add implicit set variable @{profile_name} to profile symbol 2014-04-23 16:38:29 -07:00
apparmor-parser.spec.in Add an example parser.conf file 2011-10-07 14:43:54 -07:00
apparmor.d.pod parser: Document pivot_root in the apparmor.d(5) man page 2014-04-14 21:52:02 -05:00
apparmor.pod can ?not fix apparmor.pod 2013-12-12 03:07:37 +01:00
apparmor_parser.pod fix broken URLs in various utils/*.pod files. 2013-09-19 21:17:39 +02:00
common_optarg.c Split dfa optimization and dump flag handling into a separate file so that it can be shared with DFA test programs 2014-04-23 11:10:41 -07:00
common_optarg.h Split dfa optimization and dump flag handling into a separate file so that it can be shared with DFA test programs 2014-04-23 11:10:41 -07:00
COPYING.GPL rpmlint complains about an outdated FSF address in parser/COPYING.GPL. 2011-11-27 13:52:06 +01:00
dbus.c fix: the what names can treated as a condlistid 2014-04-23 11:36:26 -07:00
dbus.h Convert mount and dbus to be subclasses of a generic rule class 2014-04-07 03:16:50 -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 Remove the old unused ptrace code that snuck in years ago. 2014-03-12 05:02:32 -07:00
lib.c parser: find SIZE_MAX on older versions of glibc and g++ 2014-04-17 11:10:41 -07:00
lib.h parser: fix i386 breakage on min() argument mismatches 2014-04-17 09:20:40 -07:00
Makefile Add the ability to specify ptrace rules 2014-04-23 11:38:04 -07:00
mount.c Convert aare_rules into a class 2014-04-23 10:57:16 -07:00
mount.h Convert mount and dbus to be subclasses of a generic rule class 2014-04-07 03:16:50 -07:00
parser.conf Commit the example parser.conf file that was supposed to be part of 2011-10-09 20:15:03 -07:00
parser.h parser: add implicit set variable @{profile_name} to profile symbol 2014-04-23 16:38:29 -07:00
parser_alias.c Remove the old unused ptrace code that snuck in years ago. 2014-03-12 05:02:32 -07:00
parser_common.c Add the ability to specify ptrace rules 2014-04-23 11:38:04 -07:00
parser_include.c parser: Quiet search dir valgrind warning and remove suppression 2014-02-05 15:17:32 -05:00
parser_include.h allow directories to be passed to the parser 2013-10-26 00:15:13 -07:00
parser_interface.c Convert to htoleXX fns instead of ifdef on endian 2014-04-23 11:07:49 -07:00
parser_lex.l Add the ability to specify ptrace rules 2014-04-23 11:38:04 -07:00
parser_main.c Add the ability to specify ptrace rules 2014-04-23 11:38:04 -07:00
parser_merge.c Remove the old unused ptrace code that snuck in years ago. 2014-03-12 05:02:32 -07:00
parser_misc.c Add the ability to specify ptrace rules 2014-04-23 11:38:04 -07:00
parser_policy.c Move buffer management for the interface to C++ ostringstream class 2014-04-23 11:07:01 -07:00
parser_regex.c Add the ability to specify ptrace rules 2014-04-23 11:38:04 -07:00
parser_symtab.c parser: add implicit set variable @{profile_name} to profile symbol 2014-04-23 16:38:29 -07:00
parser_variable.c parser: add implicit set variable @{profile_name} to profile symbol 2014-04-23 16:38:29 -07:00
parser_yacc.y change syntax of ptrace target 2014-04-23 11:39:59 -07:00
policydb.h Add the ability to mediate signals. 2014-04-23 11:35:29 -07:00
profile.cc Convert aare_rules into a class 2014-04-23 10:57:16 -07:00
profile.h parser: add implicit set variable @{profile_name} to profile symbol 2014-04-23 16:38:29 -07:00
ptrace.c change syntax of ptrace target 2014-04-23 11:39:59 -07:00
ptrace.h change syntax of ptrace target 2014-04-23 11:39:59 -07:00
rc.aaeventd.redhat as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
rc.aaeventd.suse openSUSE patch to remove the "-f" parameter from startproc in rc.aaeventd.suse / 2011-08-13 14:22:35 +02: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 Update the copyright dates for the apparmor_parser 2012-02-24 04:21:59 -08: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 as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
rc.apparmor.suse It looks like rc.apparmor.functions renamed "aa_log_action_begin()" to 2011-09-15 20:20:23 +02:00
README parser - update README information 2013-10-11 22:14:28 -07:00
README.devel parser: add some developer documentation 2013-12-10 14:15:02 -08:00
rule.c Add missing rule.[hc] files that should have been part of commit 2449 2014-04-07 11:41:25 -07:00
rule.h Add missing rule.[hc] files that should have been part of commit 2449 2014-04-07 11:41:25 -07:00
signal.c fix: the what names can treated as a condlistid 2014-04-23 11:36:26 -07:00
signal.h fix: the what names can treated as a condlistid 2014-04-23 11:36:26 -07:00
subdomain.conf Here's an update to rename another chunk of things that still used 2011-01-13 13:58:26 -08:00
subdomain.conf.pod fix broken URLs in various utils/*.pod files. 2013-09-19 21:17:39 +02:00
techdoc.tex various changes in building techdoc.tex: 2012-05-09 00:41:06 +02: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 http://wiki.apparmor.net

Please send all complaints, feature requests, rants about the software,
and questions to the apparmor@lists.ubuntu.com mailing list. Bug
reports can be filed against the AppArmor project on launchpad.net at
https://launchpad.net/apparmor or reported to the mailing list directly
for those who wish not to register for an account on launchpad.

Security issues can be filed as security bugs on launchpad
or directed to security@ubuntu.com. We will attempt to
conform to the RFP vulnerability disclosure protocol:
http://www.wiretrip.net/rfp/policy.html

Thanks.

-- The AppArmor development team