Merge lp:~thomas-voss/trust-store/do-not-prompt-or-cache-camera-app into lp:trust-store

Proposed by Thomas Voß
Status: Merged
Approved by: Alberto Aguirre
Approved revision: 60
Merged at revision: 59
Proposed branch: lp:~thomas-voss/trust-store/do-not-prompt-or-cache-camera-app
Merge into: lp:trust-store
Prerequisite: lp:~thomas-voss/trust-store/do-not-prompt-or-cache-unconfined
Diff against target: 31 lines (+10/-5)
1 file modified
src/core/trust/daemon.cpp (+10/-5)
To merge this branch: bzr merge lp:~thomas-voss/trust-store/do-not-prompt-or-cache-camera-app
Reviewer Review Type Date Requested Status
Alberto Aguirre (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+238483@code.launchpad.net

Commit message

Do not prompt or cache accesses being issued by the camera app.

Description of the change

Do not prompt or cache accesses being issued by the camera app.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/core/trust/daemon.cpp'
2--- src/core/trust/daemon.cpp 2014-10-15 17:56:27 +0000
3+++ src/core/trust/daemon.cpp 2014-10-15 17:56:28 +0000
4@@ -365,17 +365,22 @@
5 std::make_shared<core::trust::CachedAgentGlogReporter>(
6 core::trust::CachedAgentGlogReporter::Configuration{})
7 });
8- auto formatting_agent = std::make_shared<core::trust::AppIdFormattingTrustAgent>(cached_agent);
9- auto whitelisting_agent = std::make_shared<core::trust::WhiteListingAgent>(
10- core::trust::WhiteListingAgent::always_grant_for_unconfined(),
11- formatting_agent);
12+
13+ auto whitelisting_agent = std::make_shared<core::trust::WhiteListingAgent>([](const core::trust::Agent::RequestParameters& params) -> bool
14+ {
15+ static auto unconfined_predicate = core::trust::WhiteListingAgent::always_grant_for_unconfined();
16+ return unconfined_predicate(params) || params.application.id == "com.ubuntu.camera_camera";
17+ }, cached_agent);
18+
19+ auto formatting_agent = std::make_shared<core::trust::AppIdFormattingTrustAgent>(whitelisting_agent);
20+
21 auto remote_agent = remote_agent_factory(service_name, formatting_agent, dict);
22
23 return core::trust::Daemon::Skeleton::Configuration
24 {
25 service_name,
26 bus_from_name(vm[Parameters::StoreBus::name].as<std::string>()),
27- {local_store, whitelisting_agent},
28+ {local_store, formatting_agent},
29 {remote_agent}
30 };
31 }

Subscribers

People subscribed via source and target branches