apparmor/parser
Steve Beattie 3186b09035 Merge from trunk revision 1805:
Attached is a patch to make the initscript not fail if /tmp is full
  by converting the comm(1) usage on temporary files to an embedded
  awk script. On both Ubuntu and OpenSUSE, a version of awk (mawk in
  Ubuntu, gawk in OpenSUSE) is either a direct or indirect dependency
  on the minimal or base package set, and the original reporter also
  mentioned that an awk-based solution would be palatable in a way
  that converting to bash, or using perl or python here would not be.

  In the embedded awk script, I've tried to avoid gawk or mawk
  specific behaviors or extensions; e.g. this is the reason for the
  call to sort on the output of the awk script, rather than using
  gawk's asort(). But please let me know if you see anything that
  shouldn't be portable across awk implementations.

  An additional issue that is fixed in both scripts is handling
  child profiles (e.g. hats) during reload. If child profiles are
  filtered out (via grep -v '//') of the list to consider, then
  on reloading a profile where a child profile has been removed or
  renamed, that child profile will continue to stick around. However,
  if the profile containing child profiles is removed entirely,
  if the initscript attempts to unload the child profiles after the
  parent is removed, this will fail because they were unloaded when
  the parent was unloaded.  Thus I removed any filtering of child
  profiles out, but do a post-awk reverse sort which guarantees that
  any child profiles will be removed before their parent is. I also
  added the LC_COLLATE=C (based on the Ubuntu version) to the sort
  call to ensure a consistent sort order.

  To restate, the problem with the existing code is that it creates
  temporary files in $TMPDIR (by default /tmp) and if that partition
  is full, problems with the reload action ensue. Alternate solutions
  include switching the initscript to use bash and its <$() extension
  or setting TMPDIR to /dev/shm/. The former is unpalatable to some
  (particularly for an initscript), and for the latter, /dev/shm is
  only guaranteed to exist on GNU libc based systems (glibc apparently
  expects /dev/shm to exist for its POSIX shared memory implementation;
  see shm_overview(7)).  So to me, awk (sans GNU extensions) looks
  to be the least bad option here.

Nominated-By: Steve Beattie <sbeattie@ubuntu.com>
Acked-By: John Johansen <john.johansen@canonical.com>

Bug: https://launchpad.net/bugs/775785
2011-08-26 16:03:03 -07:00
..
libapparmor_re Fix compilation errors that slipped in. Yes, I realize this breaks the 2011-02-23 14:40:07 -08:00
po Fix list email typo 2011-02-23 15:57:36 -08:00
tst Bah, fix up testcases I screwed up. 2011-03-29 02:47:17 -07:00
apparmor-parser.spec.in as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
apparmor.d.pod Merge from trunk rev 1702: The parser's lexer supports 2011-03-28 11:00:24 -07:00
apparmor.pod as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
apparmor.vim.pod as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
apparmor_parser.pod as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
COPYING.GPL Here's an update to rename another chunk of things that still used 2011-01-13 13:58:26 -08:00
frob_slack_rc as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
immunix.h Update x conflict failure message 2011-02-22 03:47:03 -08:00
Makefile Merge from trunk rev 1694: reduce the number of network protocols 2011-03-17 11:18:43 -07:00
parser.h override AF_MAX for kernels that don't support proper masking 2011-03-03 15:45:10 -08:00
parser_alias.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
parser_include.c This patch adds a couple of additional lineno reporting testcases: 2010-06-25 12:43:48 -07:00
parser_include.h hrm, since I added code, I need to update the copyright details. 2010-06-04 18:57:01 -07:00
parser_interface.c From: Jeff Mahoney <jeffm@suse.com> 2011-01-14 17:44:51 -06:00
parser_lex.l This patch fixes the parser's lexer to not passthrough other invalid 2010-11-19 02:27:33 -08:00
parser_main.c apparmor_parser doesn't use its time stamp when determining if cache is stale 2011-03-08 14:49:03 -08:00
parser_merge.c Fix compilation errors that slipped in. Yes, I realize this breaks the 2011-02-23 14:40:07 -08:00
parser_misc.c Ensure that the buffer read from /proc/sys/kernel/osrelease is null terminated 2011-03-03 15:53:23 -08:00
parser_policy.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
parser_regex.c Profiles that specify a name and attachment specification fail to attach when the 2011-03-08 10:12:09 -08:00
parser_symtab.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
parser_variable.c Merge from trunk rev 1702: The parser's lexer supports 2011-03-28 11:00:24 -07:00
parser_yacc.y Add the safe xtransition key word 2010-12-20 11:58:05 -08: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 as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08: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 Merge from trunk revision 1805: 2011-08-26 16:03:03 -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 as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
rc.apparmor.suse as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
README Remove pcre and update tests where necessary 2010-07-31 16:00:52 -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 as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
techdoc.tex From: Jeff Mahoney <jeffm@suse.com> 2011-02-09 14:29:05 -08: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://forge.novell.com/modules/xfmod/project/?apparmor>.

Please send all complaints, bug reports, feature requests, rants about the
software, and questions to apparmor-general@forge.novell.com. Security
issues should be directed to security@suse.de or secure@novell.com,
where we will attempt to conform to the RFP vulnerability disclosure
protocol: http://www.wiretrip.net/rfp/policy.html

Thanks.

-- The AppArmor development team