Make transition to "postinstall" domain explicit.
When running the postinstall program, we were relying on the automatic
transition between update_engine domain and postinstall, which required
postinstall_file to be an entrypoint for such domain. This patch makes
the transition explicit by calling setexeccon(3).
Bug: 28008031
TEST=make dist; Deployed an update to edison-eng: postinstall runs as "postinstall" domain.
Change-Id: I27d404886841e0bd39589f0274eaaf98929eeac9
diff --git a/p2p_manager.cc b/p2p_manager.cc
index 127e5ff..bcfe156 100644
--- a/p2p_manager.cc
+++ b/p2p_manager.cc
@@ -396,7 +396,10 @@
// We expect to run just "p2p-client" and find it in the path.
child_pid_ = Subprocess::Get().ExecFlags(
- cmd, Subprocess::kSearchPath, {},
+ cmd,
+ Subprocess::kSearchPath,
+ {},
+ nullptr,
Bind(&LookupData::OnLookupDone, base::Unretained(this)));
if (!child_pid_) {