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
=== modified file 'src/core/media/apparmor/ubuntu.cpp'
--- src/core/media/apparmor/ubuntu.cpp 2016-04-06 15:42:15 +0000
+++ src/core/media/apparmor/ubuntu.cpp 2016-05-13 13:35:29 +0000
@@ -74,6 +74,7 @@
74static constexpr std::size_t index_package{1};74static constexpr std::size_t index_package{1};
75static constexpr std::size_t index_app{2};75static constexpr std::size_t index_app{2};
76static const std::string unity_name{"unity8-dash"};76static const std::string unity_name{"unity8-dash"};
77static const std::string mediaplayer_name{"mediaplayer-app"};
7778
78// Returns true if the context name is a valid Ubuntu app id.79// Returns true if the context name is a valid Ubuntu app id.
79// If it is, out is populated with the package and app name.80// If it is, out is populated with the package and app name.
@@ -85,7 +86,7 @@
85 static const std::regex full_re{"(.*)_(.*)_(.*)"};86 static const std::regex full_re{"(.*)_(.*)_(.*)"};
86 static const std::regex trust_store_re{"(.*)-(.*)"};87 static const std::regex trust_store_re{"(.*)-(.*)"};
8788
88 if ((s == "messaging-app" or s == unity_name)89 if ((s == "messaging-app" or s == unity_name or s == mediaplayer_name)
89 and std::regex_match(s, out, trust_store_re))90 and std::regex_match(s, out, trust_store_re))
90 {91 {
91 pkg_name = s;92 pkg_name = s;
@@ -104,7 +105,7 @@
104105
105apparmor::ubuntu::Context::Context(const std::string& name)106apparmor::ubuntu::Context::Context(const std::string& name)
106 : apparmor::Context{name},107 : apparmor::Context{name},
107 unconfined_{str() == ubuntu::unconfined},108 unconfined_{str() == ubuntu::unconfined or str() == mediaplayer_name},
108 unity_{name == unity_name},109 unity_{name == unity_name},
109 has_package_name_{process_context_name(str(), match_, pkg_name_)}110 has_package_name_{process_context_name(str(), match_, pkg_name_)}
110{111{

Subscribers

People subscribed via source and target branches

to all changes: