Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1918)

Unified Diff: content/browser/zygote_host/zygote_host_impl_linux.h

Issue 1976403002: Fix logic for checking chrome-sandbox setuid binary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rickyz feedback Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/zygote_host/zygote_host_impl_linux.h
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.h b/content/browser/zygote_host/zygote_host_impl_linux.h
index e42a222913f7294c8c0e2b9d57d8ec94363e38d0..ee70bd6900b70c830764ce257f4ab39ba4343b54 100644
--- a/content/browser/zygote_host/zygote_host_impl_linux.h
+++ b/content/browser/zygote_host/zygote_host_impl_linux.h
@@ -10,6 +10,8 @@
#include <set>
#include <string>
+#include "base/command_line.h"
+#include "base/files/scoped_file.h"
#include "base/process/process_handle.h"
#include "base/synchronization/lock.h"
#include "content/public/browser/zygote_host_linux.h"
@@ -26,21 +28,15 @@ class CONTENT_EXPORT ZygoteHostImpl : public ZygoteHost {
// Returns the singleton instance.
static ZygoteHostImpl* GetInstance();
- void Init(const std::string& sandbox_cmd);
-
- // Retrieves the sandbox command passed into Init();
- const std::string& SandboxCommand() const;
-
- // Tells the ZygoteHost the PIDs of all the zygotes.
- void AddZygotePid(pid_t pid);
+ void Init(const base::CommandLine& cmd_line);
// Returns whether or not this pid is the pid of a zygote.
bool IsZygotePid(pid_t pid) override;
- bool ShouldUseNamespaceSandbox();
-
void SetRendererSandboxStatus(int status);
int GetRendererSandboxStatus() const override;
+
+ pid_t LaunchZygote(base::CommandLine* cmd_line, base::ScopedFD* control_fd);
void AdjustRendererOOMScore(base::ProcessHandle process_handle,
int score) override;
@@ -50,10 +46,16 @@ class CONTENT_EXPORT ZygoteHostImpl : public ZygoteHost {
ZygoteHostImpl();
~ZygoteHostImpl() override;
+ // Tells the ZygoteHost the PIDs of all the zygotes.
+ void AddZygotePid(pid_t pid);
+
int renderer_sandbox_status_;
- bool should_use_namespace_sandbox_;
+
+ bool use_namespace_sandbox_;
+ bool use_suid_sandbox_;
bool use_suid_sandbox_for_adj_oom_score_;
std::string sandbox_binary_;
+
// This lock protects the |zygote_pids_| set.
base::Lock zygote_pids_lock_;
// This is a set of PIDs representing all the running zygotes.
« no previous file with comments | « content/browser/zygote_host/zygote_communication_linux.cc ('k') | content/browser/zygote_host/zygote_host_impl_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698