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

Unified Diff: chrome/browser/renderer_host/render_sandbox_host_linux.h

Issue 262020: Add support for getting the real process id from within the suid sandbox. The... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix SOCK_ typo, only send zygote magic string when using the sandbox Created 11 years, 2 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
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/browser/renderer_host/render_sandbox_host_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_sandbox_host_linux.h
===================================================================
--- chrome/browser/renderer_host/render_sandbox_host_linux.h (revision 30499)
+++ chrome/browser/renderer_host/render_sandbox_host_linux.h (working copy)
@@ -7,6 +7,9 @@
#ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_
#define CHROME_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_
+#include <string>
+
+#include "base/logging.h"
#include "base/singleton.h"
// This is a singleton object which handles sandbox requests from the
@@ -15,8 +18,15 @@
public:
// Get the file descriptor which renderers should be given in order to signal
// crashes to the browser.
- int GetRendererSocket() const { return renderer_socket_; }
- pid_t pid() const { return pid_; }
+ int GetRendererSocket() const {
+ DCHECK(init_);
+ return renderer_socket_;
+ }
+ pid_t pid() const {
+ DCHECK(init_);
+ return pid_;
+ }
+ void Init(const std::string& sandbox_path);
private:
friend struct DefaultSingletonTraits<RenderSandboxHostLinux>;
@@ -24,11 +34,12 @@
RenderSandboxHostLinux();
~RenderSandboxHostLinux();
+ bool init_;
int renderer_socket_;
int childs_lifeline_fd_;
pid_t pid_;
- DISALLOW_EVIL_CONSTRUCTORS(RenderSandboxHostLinux);
+ DISALLOW_COPY_AND_ASSIGN(RenderSandboxHostLinux);
};
#endif // CHROME_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_
Property changes on: chrome/browser/renderer_host/render_sandbox_host_linux.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/browser/renderer_host/render_sandbox_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698