specifying AppArmorProfile doesn't result in processes launched under the named profile
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
High
|
Martin Pitt |
Bug Description
Steps to reproduce
1. grab attached tarball and unpack in /tmp:
tar -zxvf /tmp/test.tar.gz
2. cd /tmp/test
3. Load the apparmor profile:
sudo apparmor_parser -r ./apparmor.profile
4. verify you see 'test-service' profile is loaded via 'sudo aa-status'. Eg:
$ sudo aa-status
apparmor module is loaded.
6 profiles are loaded.
6 profiles are in enforce mode.
...
test-service
...
5. enable the systemd service file:
$ cat ./test.service
[Unit]
Description=test webserver
[Service]
Environment=
ExecStart=
Restart=on-failure
WorkingDirector
AppArmorProfile
[Install]
WantedBy=
$ sudo cp ./test.service /etc/systemd/
$ sudo systemctl enable test.service
6. start the service
$ sudo systemctl start test.service
$ sudo systemctl --no-pager status test.service
● test.service - test webserver
Loaded: loaded (/etc/systemd/
Active: active (running) since Tue 2014-11-25 17:33:51 UTC; 4min 8s ago
Main PID: 1246 (webserver)
CGroup: /system.
└─1246 /usr/bin/python3 /tmp/test/
Nov 25 17:33:51 localhost.
7. verify that the service is confined (use Main PID from the last step. You can also use aa-status):
$ ps -Z 1246
LABEL PID TTY STAT TIME COMMAND
unconfined 1246 ? Ss 0:00 /usr/bin/python3 /tmp/test/
Because the service file uses 'AppArmorProfil
Note: you can manually start the webserver under apparmor using aa-exec. Eg:
$ sudo aa-exec -p test-service /tmp/test/
summary: |
- AppArmorProfile doesn't launch process under the name profile + AppArmorProfile doesn't launch process under the named profile |
summary: |
- AppArmorProfile doesn't launch process under the named profile + specifying AppArmorProfile doesn't launch process under the named + profile |
summary: |
- specifying AppArmorProfile doesn't launch process under the named - profile + specifying AppArmorProfile doesn't result in processes launched under + the named profile |
tags: | added: patch |
Changed in systemd (Ubuntu): | |
status: | New → In Progress |
milestone: | none → ubuntu-14.11 |
assignee: | nobody → Martin Pitt (pitti) |
Fixing this bug is a requirement for enabling systemd in Ubuntu.