]> git.pld-linux.org Git - packages/apparmor-parser.git/blob - apparmor-parser-init-args.patch
- AF_ISDN
[packages/apparmor-parser.git] / apparmor-parser-init-args.patch
1 This patch adds a variable AA_PARSER_ARGS to subdomain.conf, and passes
2 those arguments to relevant invocations of apparmor_parser.
3 ---
4  parser/rc.apparmor.functions |    9 +++++----
5  parser/subdomain.conf        |    6 ++++++
6  2 files changed, 11 insertions(+), 4 deletions(-)
7
8 Index: trunk-forge/parser/rc.apparmor.functions
9 ===================================================================
10 --- trunk-forge.orig/parser/rc.apparmor.functions
11 +++ trunk-forge/parser/rc.apparmor.functions
12 @@ -50,6 +50,7 @@ fi
13  SUBDOMAIN_MODULE_PANIC="warn"
14  SUBDOMAIN_ENABLE_OWLSM="no"
15  APPARMOR_ENABLE_AAEVENTD="no"
16 +AA_PARSER_ARGS=
17  
18  if [ -f "${APPARMOR_CONF}" ] ; then
19         #parse the conf file to see what we should do
20 @@ -106,11 +107,11 @@ parse_profiles() {
21         # get parser arg
22         case "$1" in
23                 load)
24 -                       PARSER_ARGS="--add"
25 +                       PARSER_ACTION="--add"
26                         PARSER_MSG="Loading AppArmor profiles "
27                         ;;
28                 reload)
29 -                       PARSER_ARGS="--replace"
30 +                       PARSER_ACTION="--replace"
31                         PARSER_MSG="Reloading AppArmor profiles "
32                         ;;
33                 *)
34 @@ -151,7 +152,7 @@ parse_profiles() {
35                         logger -t "AppArmor(init)" -p daemon.warn "Skipping profile $profile"
36                         STATUS=2
37                 elif [ -f "${profile}" ] ; then
38 -                       $PARSER $ABSTRACTIONS $PARSER_ARGS "$profile" > /dev/null
39 +                       $PARSER $ABSTRACTIONS $PARSER_ACTION ${AA_PARSER_ARGS} "$profile" > /dev/null
40                         if [ $? -ne 0 ]; then
41                                 echo " Profile $profile failed to load"
42                                 STATUS=1
43 @@ -183,7 +184,7 @@ profiles_names_list() {
44  
45         for profile in $PROFILE_DIR/*; do
46                 if ! skip_profile "${profile}" && [ -f "${profile}" ] ; then
47 -                       LIST_ADD=$($PARSER $ABSTRACTIONS -N "$profile" | grep -v '\^')
48 +                       LIST_ADD=$($PARSER $ABSTRACTIONS ${AA_PARSER_ARGS} -N "$profile" | grep -v '\^')
49                         if [ $? -eq 0 ]; then
50                                 echo "$LIST_ADD" >>$TMPFILE
51                         fi
52 Index: trunk-forge/parser/subdomain.conf
53 ===================================================================
54 --- trunk-forge.orig/parser/subdomain.conf
55 +++ trunk-forge/parser/subdomain.conf
56 @@ -25,6 +25,12 @@ SUBDOMAIN_ENABLE_OWLSM="no"
57  # Enable the AppArmor event daemon for reporting?
58  APPARMOR_ENABLE_AAEVENTD="no"
59  
60 +## Path: System/AppArmor
61 +## Description: Add arguments to the apparmor_parser binary
62 +## Type: String
63 +#
64 +AA_PARSER_ARGS=""
65 +
66  #SUBDOMAIN_MODULE_PANIC=XXX
67  #This option controls how subdomain behaves when the init script attempts
68  #to load the SubDomain module and fails.  There are 4 options
This page took 0.037075 seconds and 3 git commands to generate.