Merge lp:~ted/media-hub/deb-apps-apparmor into lp:media-hub

Proposed by Ted Gould
Status: Work in progress
Proposed branch: lp:~ted/media-hub/deb-apps-apparmor
Merge into: lp:media-hub
Diff against target: 29 lines (+3/-2)
1 file modified
src/core/media/apparmor/ubuntu.cpp (+3/-2)
To merge this branch: bzr merge lp:~ted/media-hub/deb-apps-apparmor
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+294567@code.launchpad.net

Commit message

Add mediaplayer-app to the list of accepted legacy apps

To post a comment you must log in.
lp:~ted/media-hub/deb-apps-apparmor updated
184. By Ted Gould

Make it so that media player comes up as unconfined

Unmerged revisions

184. By Ted Gould

Make it so that media player comes up as unconfined

183. By Ted Gould

Add media player app to the list of known apparmor profiles

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/core/media/apparmor/ubuntu.cpp'
2--- src/core/media/apparmor/ubuntu.cpp 2016-04-06 15:42:15 +0000
3+++ src/core/media/apparmor/ubuntu.cpp 2016-05-13 13:35:29 +0000
4@@ -74,6 +74,7 @@
5 static constexpr std::size_t index_package{1};
6 static constexpr std::size_t index_app{2};
7 static const std::string unity_name{"unity8-dash"};
8+static const std::string mediaplayer_name{"mediaplayer-app"};
9
10 // Returns true if the context name is a valid Ubuntu app id.
11 // If it is, out is populated with the package and app name.
12@@ -85,7 +86,7 @@
13 static const std::regex full_re{"(.*)_(.*)_(.*)"};
14 static const std::regex trust_store_re{"(.*)-(.*)"};
15
16- if ((s == "messaging-app" or s == unity_name)
17+ if ((s == "messaging-app" or s == unity_name or s == mediaplayer_name)
18 and std::regex_match(s, out, trust_store_re))
19 {
20 pkg_name = s;
21@@ -104,7 +105,7 @@
22
23 apparmor::ubuntu::Context::Context(const std::string& name)
24 : apparmor::Context{name},
25- unconfined_{str() == ubuntu::unconfined},
26+ unconfined_{str() == ubuntu::unconfined or str() == mediaplayer_name},
27 unity_{name == unity_name},
28 has_package_name_{process_context_name(str(), match_, pkg_name_)}
29 {

Subscribers

People subscribed via source and target branches

to all changes: