~ubuntu-branches/ubuntu/lucid/apparmor/lucid-proposed

« back to all changes in this revision

Viewing changes to debian/apparmor.init

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-11-02 13:33:15 UTC
  • mfrom: (99.1.11 maverick-proposed)
  • Revision ID: james.westby@ubuntu.com-20101102133315-jcil3cqqiz6lr0km
Tags: 2.5.1-0ubuntu0.10.04.1
* Backport 2.5.1-0ubuntu0.10.10.1 from maverick for userspace tools to work
  with newer kernels (LP: #660077)
  NOTE: user-tmp now uses 'owner' match, so non-default profiles will have
  to be adjusted when 2 separately confined applications that both use the
  user-tmp abstraction depend on being able to cooperatively share files
  with each other in /tmp or /var/tmp.
* remove the following patches (features not appropriate for SRU):
  - 0002-add-chromium-browser.patch
  - 0003-local-includes.patch
  - 0004-ubuntu-abstractions-updates.patch
* debian/rules (this makes it the same as what was shipped in 10.04 LTS
  release):
  - don't ship aa-update-browser and its man page (requires
    0004-ubuntu-abstractions-updates.patch)
  - don't ship apparmor.d/local/ (requires 0003-local-includes.patch)
  - don't use dh_apparmor (not in Ubuntu 10.04 LTS)
  - don't ship chromium profile
* remove debian/profiles/chromium-browser
* remove debian/aa-update-browser*
* debian/apparmor-profiles.postinst: revert to that in lucid release
  (requires dh_apparmor and 0002-add-chromium-browser.patch)
* remove debian/apparmor-profiles.postrm: doesn't make sense without
  0002-add-chromium-browser.patch
* debian/control:
  - revert Build-Depends on debhelper (>= 5)
  - revert Standards-Version to 3.8.4
  - revert Vcs-Bzr
  - use Conflicts/Replaces version that was in Ubuntu 10.04 LTS
* debian/patches/0011-lucid-compat-dbus.patch: move /var/lib/dbus/machine-id
  back into dbus, since profiles on 10.04 LTS expect it there
* debian/patches/0012-lucid-compat-kde.patch: add kde4-config to kde
  abstraction, since the firefox profile on Ubuntu 10.04 LTS expects it to
  be there

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
 
69
69
# Allow "recache" even when running on the liveCD
70
70
if [ "$1" = "recache" ]; then
 
71
        log_daemon_msg "Recaching AppArmor profiles"
71
72
        recache_profiles
72
 
        exit $?
 
73
        rc=$?
 
74
        log_end_msg "$rc"
 
75
        exit $rc
73
76
fi
74
77
 
75
78
# do not perform start/stop/reload actions when running from liveCD
76
79
test -d /rofs/etc/apparmor.d && exit 0
77
80
 
 
81
rc=255
78
82
case "$1" in
79
83
        start)
80
84
                log_daemon_msg "Starting AppArmor profiles"
84
88
                log_end_msg "$rc"
85
89
                ;;
86
90
        stop)
 
91
                log_daemon_msg "Clearing AppArmor profiles cache"
 
92
                clear_cache
 
93
                rc=$?
 
94
                log_end_msg "$rc"
 
95
                cat >&2 <<EOM
 
96
All profile caches have been cleared, but no profiles have been unloaded.
 
97
Unloading profiles will leave already running processes permanently
 
98
unconfined, which can lead to unexpected situations.
 
99
 
 
100
To set a process to complain mode, use the command line tool
 
101
'aa-complain'. To really tear down all profiles, run the init script
 
102
with the 'teardown' option."
 
103
EOM
 
104
                ;;
 
105
        teardown)
87
106
                log_daemon_msg "Unloading AppArmor profiles"
88
107
                securityfs
89
108
                running_profile_names | while read profile; do
117
136
                ;;
118
137
        status)
119
138
                securityfs
120
 
                if [ -x /usr/bin/aa-status ]; then
121
 
                        /usr/bin/aa-status --verbose
 
139
                if [ -x /usr/sbin/aa-status ]; then
 
140
                        /usr/sbin/aa-status --verbose
122
141
                else
123
142
                        cat "$AA_SFS"/profiles
124
143
                fi
126
145
                ;;
127
146
        *)
128
147
                usage
129
 
                exit 1
 
148
                rc=1
130
149
                ;;
131
150
        esac
132
151
exit $rc