apparmor/changehat/mod_apparmor
Steve Beattie 8250e061d4 mod_apparmor: make the ServerName be the default AADefaultHatName
Bug: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1207424

This patch makes the default value for AADefaultHatName be the
server/vhost name, which can be specified in apache via the ServerName
configuration declaration. It can be overridden by setting
AADefaultHatName directly. Thus, with this patch applied, the order of
attempted hats will be:

  1. try to aa_change_hat(2) into a matching AAHatName hat if it exists
     and applies, otherwise
  2. try to aa_change_hat(2) into the URI itself, otherwise
  3. try to aa_change_hat(2) into the value of ServerName, unless
     AADefaultHatName has been explicitly set for this server/vhost, in
     which case that value will be used, otherwise
  4. try to aa_change_hat(2) into the DEFAULT_URI hat, if it exists,
     otherwise
  5. fall back to the global Apache policy

This should eliminate the need for most admins to define both
ServerName and AADefaultHatName, unless there's a specific need for
the values to deviate.

Man page documentation is updated as well, though probably more
wordsmithing is needed there for clarity.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-01-23 13:51:34 -08:00
..
apache2-mod_apparmor.spec.in as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
COPYING.LGPL Import the rest of the core functionality of the internal apparmor 2006-04-11 21:52:54 +00:00
frob_sysconfig as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
Makefile Convert make errors finding libapparmor to only occur when building 2014-01-09 12:11:19 -08:00
mod_apparmor.c mod_apparmor: make the ServerName be the default AADefaultHatName 2014-01-23 13:51:34 -08:00
mod_apparmor.conf Import the rest of the core functionality of the internal apparmor 2006-04-11 21:52:54 +00:00
mod_apparmor.pod mod_apparmor: make the ServerName be the default AADefaultHatName 2014-01-23 13:51:34 -08:00