summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 00:50:33 +0000
committerjln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 00:50:33 +0000
commit4fe5b9dc4018358bd042276cb2bce7391698c36c (patch)
treec476b968743809bf2f5e5eb9920e0c37eb49149a
parent9af032fac4f75bc79a9f1acbb7582d0d1aa846f7 (diff)
downloadchromium_src-4fe5b9dc4018358bd042276cb2bce7391698c36c.zip
chromium_src-4fe5b9dc4018358bd042276cb2bce7391698c36c.tar.gz
chromium_src-4fe5b9dc4018358bd042276cb2bce7391698c36c.tar.bz2
Zygote: fix real PID reporting when using a fork delegate.
When using a fork delegate, the Zygote wouldn't return the correct PID after a fork request was honored. BUG=272349 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/23123002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217414 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/zygote/zygote_linux.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/content/zygote/zygote_linux.cc b/content/zygote/zygote_linux.cc
index abb52ae..6e42a9d 100644
--- a/content/zygote/zygote_linux.cc
+++ b/content/zygote/zygote_linux.cc
@@ -326,10 +326,14 @@ int Zygote::ForkWithRealPid(const std::string& process_type,
LOG(ERROR) << "METHOD_GET_CHILD_WITH_INODE failed";
goto error;
}
+
real_pids_to_sandbox_pids[real_pid] = pid;
+ } else {
+ // If no SUID sandbox is involved then no pid translation is
+ // necessary.
+ real_pid = pid;
}
if (use_helper) {
- real_pid = pid;
if (!helper_->AckChild(pipe_fds[1], channel_switch)) {
LOG(ERROR) << "Failed to synchronise with zygote fork helper";
goto error;