apparmor apport hook should use root_command_hook() for running apparmor_status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apparmor (Ubuntu) |
Fix Released
|
Low
|
Jamie Strandboge | ||
Lucid |
Fix Released
|
Low
|
Jamie Strandboge | ||
Maverick |
Fix Released
|
Low
|
Jamie Strandboge | ||
Natty |
Fix Released
|
Low
|
Jamie Strandboge |
Bug Description
SRU
1. impact of the bug is minimal for stable releases, since apport is disabled by default. However, being able to run 'ubuntu-bug', 'apport-bug' or 'apport-collect' is useful for developers trying to get more information from users.
2. This has not been addressed in the development branch (it isn't open yet).
3. Patch is very small. See comment #1.
4. TEST CASE:
As non-root:
$ apport-bug apparmor --save /tmp/apport.txt
You should be prompted by sudo at this point.
5. The regression potential of the patch is very low, as it updates the apport hook which is not enabled by default in the stable releases.
Binary package hint: apparmor
When generating a bug report about apparmor, if apport is run as non-root, the apparmor_status program fails because it needs privilege to read the loaded state of the apparmor policies. This results in the ApparmorStatusO
Error: command /usr/sbin/
apparmor module is loaded.
(as it is in this bug report). The invocation of apparmor_status in the apport hook should be converted to use root_command_hook so that, if the user is capable of running with privilege, they can include the status output.
The attached patch does this.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: apparmor 2.5.1~rc1-0ubuntu2
ProcVersionSign
Uname: Linux 2.6.35-
ApparmorStatusO
Error: command /usr/sbin/
apparmor module is loaded.
Architecture: i386
Date: Tue Oct 5 23:54:54 2010
InstallationMedia: Ubuntu-Server 10.10 "Maverick Meerkat" - Alpha i386 (20100916)
ProcEnviron:
SHELL=/bin/bash
LANG=en_US.UTF-8
SourcePackage: apparmor
tags: | added: patch |
Changed in apparmor (Ubuntu Lucid): | |
status: | New → In Progress |
importance: | Undecided → Low |
milestone: | none → lucid-updates |
assignee: | nobody → Jamie Strandboge (jdstrand) |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
tags: |
added: verification-done removed: verification-needed |
tags: | added: testcase |
SRU
1. impact of the bug is minimal for stable releases, since apport is disabled by default. However, being able to run 'ubuntu-bug', 'apport-bug' or 'apport-collect' is useful for developers trying to get more information from users.
2. This has not been addressed in the development branch (it isn't open yet).
3. Patch is very small. See comment #1.
4. TEST CASE:
As non-root:
$ apport-bug -p apparmor --save /tmp/apport.txt
You should be prompted by sudo at this point.
5. The regression potential of the patch is very low, as it updates the apport hook which is not enabled by default in the stable releases.