Install extra profiles in /usr/share/apparmor/extra-profiles/ instead of

/etc/apparmor/profiles/extras/, and update the path at various places.

Also update the mailinglist address in extra-profiles README and 
recommend cp instead of mv.

Note: if you want to have a symlink 
    /etc/apparmor/profiles/extras -> /usr/share/apparmor/extra-profiles/
for backward compability, you'll have to create it yourself (for example
in the .spec file)

This also fixes https://bugzilla.novell.com/show_bug.cgi?id=713647


Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Christian Boltz 2012-09-27 23:57:21 +02:00
parent 0742f72f4f
commit 5ae05cc2f4
6 changed files with 11 additions and 11 deletions

View file

@ -33,7 +33,7 @@ endif
DESTDIR=/
PROFILES_DEST=${DESTDIR}/etc/apparmor.d
EXTRAS_DEST=${DESTDIR}/etc/apparmor/profiles/extras/
EXTRAS_DEST=${DESTDIR}/usr/share/apparmor/extra-profiles/
PROFILES_SOURCE=./apparmor.d
EXTRAS_SOURCE=./apparmor/profiles/extras/
SUBDIRS_MUST_BE_SKIPPED=${PROFILES_SOURCE}/abstractions ${PROFILES_SOURCE}/apache2.d ${PROFILES_SOURCE}/program-chunks ${PROFILES_SOURCE}/tunables ${PROFILES_SOURCE}/local

View file

@ -35,7 +35,7 @@ Obsoletes: subdomain-profiles
Provides: subdomain-profiles
# hrm, still need to enumerate each directory in these paths in files :(
%define extras_dir %{_sysconfdir}/apparmor/profiles/extras/
%define extras_dir /usr/share/apparmor/extra-profiles/
%define profiles_dir %{_sysconfdir}/apparmor.d/
%description

View file

@ -12,9 +12,9 @@ configuration.
To use, for example, the postfix profiles, we recommend running commands
such as:
# cd /etc/apparmor/profiles/extras
# mv *postfix* usr.sbin.post* /etc/apparmor.d/
# mv usr.bin.procmail usr.sbin.sendmail /etc/apparmor.d/
# cd /usr/share/apparmor/extra-profiles/
# cp *postfix* usr.sbin.post* /etc/apparmor.d/
# cp usr.bin.procmail usr.sbin.sendmail /etc/apparmor.d/
# aa-complain /etc/apparmor.d/*postfix*
# aa-complain /etc/apparmor.d/usr.sbin.post*
# aa-complain /etc/apparmor.d/usr.bin.procmail
@ -39,7 +39,7 @@ working as you expect.
Feedback on these unsupported profiles is welcomed; any
contributions for this directory should be clearly licensed
-- we recommend using the GPL. Please mail suggestions or
modifications to the apparmor-general@forge.novell.com mail list:
http://forge.novell.com/mailman/listinfo/apparmor-general
modifications to the apparmor@lists.ubuntu.com mail list:
https://lists.ubuntu.com/mailman/listinfo/apparmor
Thanks

View file

@ -6782,7 +6782,7 @@ $profiledir = find_first_dir($cfg->{settings}{profiledir}) || "/etc/apparmor.d";
unless (-d $profiledir) { fatal_error "Can't find AppArmor profiles."; }
$extraprofiledir = find_first_dir($cfg->{settings}{inactive_profiledir}) ||
"/etc/apparmor/profiles/extras/";
"/usr/share/apparmor/extra-profiles/";
$parser = find_first_file($cfg->{settings}{parser}) || "/sbin/apparmor_parser";
unless (-x $parser) { fatal_error "Can't find apparmor_parser."; }

View file

@ -10,7 +10,7 @@
[settings]
profiledir = /etc/apparmor.d /etc/subdomain.d
inactive_profiledir = /usr/share/doc/apparmor-profiles/extras
inactive_profiledir = /usr/share/apparmor/extra-profiles
logfiles = /var/log/audit/audit.log /var/log/syslog /var/log/messages
parser = /sbin/apparmor_parser /sbin/subdomain_parser

View file

@ -27,8 +27,8 @@
" stick this file into ~/.vim/syntax/ and add these commands into your .vimrc
" to have vim automagically use this syntax file for these directories:
"
" autocmd BufNewFile,BufRead /etc/apparmor.d/* set syntax=apparmor
" autocmd BufNewFile,BufRead /etc/apparmor/profiles/* set syntax=apparmor
" autocmd BufNewFile,BufRead /etc/apparmor.d/* set syntax=apparmor
" autocmd BufNewFile,BufRead /usr/share/apparmor/extra-profiles/* set syntax=apparmor
" profiles are case sensitive
syntax case match