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

Side by Side Diff: sandbox/linux/services/credentials.h

Issue 1158793003: Enable one PID namespace per process for NaCl processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable PID namespace per process for nonsfi newlib NaCl as well. Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « content/zygote/zygote_linux.cc ('k') | sandbox/linux/services/credentials.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SANDBOX_LINUX_SERVICES_CREDENTIALS_H_ 5 #ifndef SANDBOX_LINUX_SERVICES_CREDENTIALS_H_
6 #define SANDBOX_LINUX_SERVICES_CREDENTIALS_H_ 6 #define SANDBOX_LINUX_SERVICES_CREDENTIALS_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 // Link errors are tedious to track, raise a compile-time error instead. 9 // Link errors are tedious to track, raise a compile-time error instead.
10 #if defined(OS_ANDROID) 10 #if defined(OS_ANDROID)
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // CAP_SYS_CHROOT can be acquired by using the MoveToNewUserNS() API. 88 // CAP_SYS_CHROOT can be acquired by using the MoveToNewUserNS() API.
89 // |proc_fd| must be a file descriptor to /proc/ and must be the only open 89 // |proc_fd| must be a file descriptor to /proc/ and must be the only open
90 // directory file descriptor of the process. 90 // directory file descriptor of the process.
91 // 91 //
92 // CRITICAL: 92 // CRITICAL:
93 // - the caller must close |proc_fd| eventually or access to the file 93 // - the caller must close |proc_fd| eventually or access to the file
94 // system can be recovered. 94 // system can be recovered.
95 // - DropAllCapabilities() must be called to prevent escapes. 95 // - DropAllCapabilities() must be called to prevent escapes.
96 static bool DropFileSystemAccess(int proc_fd) WARN_UNUSED_RESULT; 96 static bool DropFileSystemAccess(int proc_fd) WARN_UNUSED_RESULT;
97 97
98 // Forks and drops capabilities in the child.
99 static pid_t ForkAndDropCapabilitiesInChild();
100
98 private: 101 private:
99 DISALLOW_IMPLICIT_CONSTRUCTORS(Credentials); 102 DISALLOW_IMPLICIT_CONSTRUCTORS(Credentials);
100 }; 103 };
101 104
102 } // namespace sandbox. 105 } // namespace sandbox.
103 106
104 #endif // SANDBOX_LINUX_SERVICES_CREDENTIALS_H_ 107 #endif // SANDBOX_LINUX_SERVICES_CREDENTIALS_H_
OLDNEW
« no previous file with comments | « content/zygote/zygote_linux.cc ('k') | sandbox/linux/services/credentials.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698