/external/chromium_org/sandbox/linux/services/ |
credentials.h | 31 // table, excluding |proc_fd|, which should be a file descriptor for 33 int CountOpenFds(int proc_fd); 40 // has been dropped. In this case, |proc_fd| should be a file descriptor to 41 // /proc. The file descriptor in |proc_fd| will be ignored by 44 // If /proc is available, |proc_fd| can be passed as -1. 45 // If |proc_fd| is -1 and /proc is not available, this function will return 47 bool HasOpenDirectory(int proc_fd);
|
credentials_unittest.cc | 61 base::ScopedFD proc_fd(open("/proc", O_RDONLY | O_DIRECTORY)); 62 ASSERT_TRUE(proc_fd.is_valid()); 64 int fd_count = creds.CountOpenFds(proc_fd.get()); 67 EXPECT_EQ(fd_count + 1, creds.CountOpenFds(proc_fd.get())); 69 EXPECT_EQ(fd_count, creds.CountOpenFds(proc_fd.get())); 88 int proc_fd = open("/proc", O_RDONLY | O_DIRECTORY); local 89 base::ScopedFD proc_fd_closer(proc_fd); 90 ASSERT_LE(0, proc_fd); 92 // Don't pass |proc_fd|, an open directory (proc_fd) shoul [all...] |
credentials.cc | 176 int Credentials::CountOpenFds(int proc_fd) { 177 DCHECK_LE(0, proc_fd); 178 int proc_self_fd = openat(proc_fd, "self/fd", O_DIRECTORY | O_RDONLY); 196 if (fd_num == proc_fd || fd_num == proc_self_fd) { 205 bool Credentials::HasOpenDirectory(int proc_fd) { 207 if (proc_fd >= 0) { 208 proc_self_fd = openat(proc_fd, "self/fd", O_DIRECTORY | O_RDONLY); 240 if (fd_num == proc_fd || fd_num == proc_self_fd) {
|
/external/chromium_org/sandbox/linux/seccomp-bpf/ |
sandbox_bpf_test_runner.cc | 36 int proc_fd; local 37 SANDBOX_ASSERT((proc_fd = open("/proc", O_RDONLY | O_DIRECTORY)) >= 0); 38 SANDBOX_ASSERT(sandbox::SandboxBPF::SupportsSeccompSandbox(proc_fd) == 43 sandbox.set_proc_fd(proc_fd);
|
sandbox_bpf.h | 75 // "proc_fd" should be a file descriptor for "/proc", or -1 if not 77 static SandboxStatus SupportsSeccompSandbox(int proc_fd); 88 void set_proc_fd(int proc_fd); 209 int proc_fd() { return proc_fd_; } function in class:sandbox::SandboxBPF
|
sandbox_bpf.cc | 143 bool IsSingleThreaded(int proc_fd) { 144 if (proc_fd < 0) { 152 if ((task = openat(proc_fd, "self/task", O_RDONLY | O_DIRECTORY)) < 0 || 435 SandboxBPF::SandboxStatus SandboxBPF::SupportsSeccompSandbox(int proc_fd) { 445 if (!IsSingleThreaded(proc_fd)) { 451 if (status_ == STATUS_UNAVAILABLE && IsSingleThreaded(proc_fd)) { 475 sandbox.set_proc_fd(proc_fd); 483 if (status_ == STATUS_AVAILABLE && !IsSingleThreaded(proc_fd)) { 508 void SandboxBPF::set_proc_fd(int proc_fd) { proc_fd_ = proc_fd; } [all...] |
/external/chromium_org/v8/src/base/platform/ |
platform-qnx.cc | 181 int proc_fd, num, i; local 191 if ((proc_fd = open(buf, O_RDONLY)) == -1) { 192 close(proc_fd); 197 if (devctl(proc_fd, DCMD_PROC_MAPINFO, NULL, 0, &num) != EOK) { 198 close(proc_fd); 205 close(proc_fd); 210 if (devctl(proc_fd, DCMD_PROC_PAGEDATA, 213 close(proc_fd); 221 if (devctl(proc_fd, DCMD_PROC_MAPDEBUG, &map, sizeof(map), 0) != EOK) { 229 close(proc_fd); [all...] |
/external/chromium_org/components/nacl/loader/sandbox_linux/ |
nacl_sandbox_linux.cc | 34 int proc_fd = open("/proc/self/exe", O_RDONLY); local 35 if (proc_fd >= 0) { 36 PCHECK(0 == IGNORE_EINTR(close(proc_fd)));
|
/external/chromium_org/content/common/sandbox_linux/ |
sandbox_linux.cc | 88 // Try to open /proc/self/task/ with the help of |proc_fd|. |proc_fd| can be 90 int OpenProcTaskFd(int proc_fd) { 92 if (proc_fd >= 0) { 95 proc_self_task = openat(proc_fd, "self/task/", O_RDONLY | O_DIRECTORY);
|