The org.freedesktop.DBus.GetConnectionAppArmorSecurityContext() method is deprecated
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Online Accounts API |
Confirmed
|
Medium
|
Alberto Mardegan | ||
apparmor (Ubuntu) |
In Progress
|
Medium
|
Tyler Hicks | ||
content-hub (Ubuntu) |
Confirmed
|
Medium
|
Unassigned | ||
dbus (Ubuntu) |
Triaged
|
Medium
|
Unassigned | ||
media-hub (Ubuntu) |
Confirmed
|
Medium
|
Unassigned | ||
mediascanner2 (Ubuntu) |
Fix Released
|
Critical
|
James Henstridge | ||
signon-apparmor-extension (Ubuntu) |
Fix Released
|
Medium
|
Alberto Mardegan | ||
ubuntu-download-manager (Ubuntu) |
Confirmed
|
Medium
|
Unassigned | ||
ubuntu-system-settings-online-accounts (Ubuntu) |
Fix Released
|
Medium
|
Alberto Mardegan |
Bug Description
When upstream D-Bus merged the AppArmor mediation patches, they did not like the GetConnectionAp
In order to switch to the new method, you'll need to depend on libapparmor 2.10 or newer.
I'll be adding example code that illustrates how to switch from GetConnectionAp
content-hub, media-hub, mediascanner2, signon-
The apparmor package should be updated to drop the libapparmor-
Related branches
- Michi Henning (community): Approve
- unity-api-1-bot: Needs Fixing (continuous-integration)
-
Diff: 82 lines (+29/-13)1 file modifiedsrc/ms-dbus/service-skeleton.cc (+29/-13)
- Alexandre Abreu (community): Approve
-
Diff: 446 lines (+183/-41)11 files modified.qmake.conf (+2/-0)
common-project-config.pri (+6/-2)
debian/control (+4/-3)
src/access-control-manager.cpp (+18/-9)
src/access-control-manager.h (+3/-0)
tests/dbus_apparmor.py (+50/-0)
tests/fake_dbus.h (+52/-0)
tests/mock/apparmor.cpp (+0/-11)
tests/mock/mock.pro (+2/-3)
tests/tst_extension.cpp (+38/-11)
tests/tst_extension.pro (+8/-2)
- Alexandre Abreu (community): Approve
-
Diff: 82 lines (+20/-7)4 files modifiedonline-accounts-service/online-accounts-service.pro (+1/-0)
online-accounts-service/utils.cpp (+17/-7)
tests/online-accounts-service/tst_service.pro (+1/-0)
tests/online-accounts-service/tst_signonui_service.pro (+1/-0)
- Alexandre Abreu (community): Approve
-
Diff: 157 lines (+51/-24)4 files modifiedsrc/lib/OnlineAccountsDaemon/client_registry.cpp (+16/-6)
tests/daemon/functional_tests/dbus_apparmor.py (+28/-14)
tests/daemon/functional_tests/fake_dbus_apparmor.h (+3/-3)
tests/daemon/functional_tests/functional_tests.cpp (+4/-1)
Changed in content-hub (Ubuntu): | |
status: | New → Confirmed |
Changed in media-hub (Ubuntu): | |
status: | Triaged → Confirmed |
Changed in content-hub (Ubuntu): | |
importance: | Undecided → Medium |
Changed in apparmor (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in dbus (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in mediascanner2 (Ubuntu): | |
status: | New → Confirmed |
Changed in signon-apparmor-extension (Ubuntu): | |
status: | New → Confirmed |
Changed in ubuntu-download-manager (Ubuntu): | |
status: | New → Confirmed |
Changed in ubuntu-system-settings-online-accounts (Ubuntu): | |
status: | New → Confirmed |
Changed in mediascanner2 (Ubuntu): | |
importance: | Undecided → Medium |
Changed in signon-apparmor-extension (Ubuntu): | |
importance: | Undecided → Medium |
Changed in ubuntu-download-manager (Ubuntu): | |
importance: | Undecided → Medium |
Changed in ubuntu-system-settings-online-accounts (Ubuntu): | |
importance: | Undecided → Medium |
description: | updated |
Changed in online-accounts-api: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Alberto Mardegan (mardy) |
Changed in signon-apparmor-extension (Ubuntu): | |
assignee: | nobody → Alberto Mardegan (mardy) |
Changed in ubuntu-system-settings-online-accounts (Ubuntu): | |
assignee: | nobody → Alberto Mardegan (mardy) |
tags: | added: audit |
Changed in mediascanner2 (Ubuntu): | |
assignee: | nobody → James Henstridge (jamesh) |
importance: | Medium → Critical |
From what I can see, GetConnectionCr edentials( ) does not quite return the same information as GetConnectionAp pArmorSecurityC ontext( ). With the new API, I get back a value like "profile_name (enforce)".
I can extract the profile name using aa_splitcon(), but this was only added in libapparmor 2.10. Unfortunately vivid only provides version 2.9.1.
We're going to be stuck supporting vivid for a while, so I guess there are two ways to solve this:
1. someone uploads a new libapparmor build for vivid to the stable- phone-overlay PPA.
2. I provide my own version of the label splitting code in my project.
(1) seems like the preferable option, since it would reduce code duplication over all the projects listed in this bug.