Merge lp:~thomas-voss/location-service/hot-fix-for-camera-app-and-osmtouch into lp:location-service/trunk

Proposed by Thomas Voß
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 85
Merged at revision: 84
Proposed branch: lp:~thomas-voss/location-service/hot-fix-for-camera-app-and-osmtouch
Merge into: lp:location-service/trunk
Diff against target: 41 lines (+19/-0)
1 file modified
src/location_service/com/ubuntu/location/service/trust_store_permission_manager.cpp (+19/-0)
To merge this branch: bzr merge lp:~thomas-voss/location-service/hot-fix-for-camera-app-and-osmtouch
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ricardo Salveti (community) Approve
Review via email: mp+229975@code.launchpad.net

Commit message

Add camera app and osm touch to the whitelist for permission mgmt.

Description of the change

Add camera app and osm touch to the whitelist for permission mgmt.

To post a comment you must log in.
Revision history for this message
Ricardo Salveti (rsalveti) :
review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
85. By Thomas Voß

Adjust camera-app version.

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Looks fine, can bite us again soon but better then allowing any version and forgetting to remove this fix.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/location_service/com/ubuntu/location/service/trust_store_permission_manager.cpp'
--- src/location_service/com/ubuntu/location/service/trust_store_permission_manager.cpp 2014-08-05 19:36:05 +0000
+++ src/location_service/com/ubuntu/location/service/trust_store_permission_manager.cpp 2014-08-07 20:41:24 +0000
@@ -30,11 +30,24 @@
3030
31#include <sys/apparmor.h>31#include <sys/apparmor.h>
3232
33#include <set>
34
33namespace location = com::ubuntu::location;35namespace location = com::ubuntu::location;
34namespace service = com::ubuntu::location::service;36namespace service = com::ubuntu::location::service;
3537
36namespace38namespace
37{39{
40std::set<std::string> whitelisted_apps
41{
42 "com.ubuntu.camera_camera_3.0.0.342",
43 "me.yohanboniface.osmtouch_OSMTouch_0.1.3"
44};
45
46bool is_application_with_confinement_profile_whitelisted(const std::string& profile)
47{
48 return whitelisted_apps.count(profile) > 0;
49}
50
38bool is_running_under_testing()51bool is_running_under_testing()
39{52{
40 return core::posix::this_process::env::get(53 return core::posix::this_process::env::get(
@@ -133,6 +146,12 @@
133 return service::PermissionManager::Result::rejected;146 return service::PermissionManager::Result::rejected;
134 }147 }
135148
149 // This is an ugly hack to prevent a revert. It will be removed as soon as
150 // https://bugs.launchpad.net/qtmir/+bug/1352977 is fixed. A separate bug tracks the removal
151 // of this hack: https://bugs.launchpad.net/location-service/+bug/1354080
152 if (is_application_with_confinement_profile_whitelisted(profile))
153 return Result::granted;
154
136 std::string description;155 std::string description;
137156
138 if (profile == "unconfined")157 if (profile == "unconfined")

Subscribers

People subscribed via source and target branches