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

Unified Diff: sandbox/linux/services/credentials.cc

Issue 2357393003: Add check for file system access to the sandbox. (Closed)
Patch Set: Fix IsSandboxed() check when loading flash player. Created 4 years, 3 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: sandbox/linux/services/credentials.cc
diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
index 0c617d4b2f19454262a8ac33d0aac07173d2b63c..766fe04616801dd85f36c308b40bffecdc7db99b 100644
--- a/sandbox/linux/services/credentials.cc
+++ b/sandbox/linux/services/credentials.cc
@@ -321,6 +321,10 @@ bool Credentials::DropFileSystemAccess(int proc_fd) {
return true;
}
+bool Credentials::HasFileSystemAccess() {
+ return base::DirectoryExists(base::FilePath("/proc"));
+}
+
pid_t Credentials::ForkAndDropCapabilitiesInChild() {
pid_t pid = fork();
if (pid != 0) {

Powered by Google App Engine
This is Rietveld 408576698