Searched refs:proc_fd (Results 1 - 9 of 9) sorted by relevance
/external/chromium_org/sandbox/linux/services/ |
H A D | credentials.h | 34 // has been dropped. In this case, |proc_fd| should be a file descriptor to 35 // /proc. The file descriptor in |proc_fd| will be ignored by 38 // If /proc is available, |proc_fd| can be passed as -1. 39 // If |proc_fd| is -1 and /proc is not available, this function will return 41 bool HasOpenDirectory(int proc_fd);
|
H A D | credentials_unittest.cc | 77 int proc_fd = open("/proc", O_RDONLY | O_DIRECTORY); local 78 ScopedFD proc_fd_closer(&proc_fd); 79 ASSERT_LE(0, proc_fd); 81 // Don't pass |proc_fd|, an open directory (proc_fd) should 84 // Pass |proc_fd| and no open directory should be detected. 85 EXPECT_FALSE(creds.HasOpenDirectory(proc_fd)); 91 EXPECT_TRUE(creds.HasOpenDirectory(proc_fd)); 94 // The "/dev" file descriptor should now be closed, |proc_fd| is the only 96 EXPECT_FALSE(creds.HasOpenDirectory(proc_fd)); [all...] |
H A D | credentials.cc | 159 bool Credentials::HasOpenDirectory(int proc_fd) { argument 161 if (proc_fd >= 0) { 162 proc_self_fd = openat(proc_fd, "self/fd", O_DIRECTORY | O_RDONLY); 194 if (fd_num == proc_fd || fd_num == proc_self_fd) {
|
/external/chromium_org/sandbox/linux/seccomp-bpf/ |
H A D | bpf_tests.h | 78 int proc_fd; local 79 BPF_ASSERT((proc_fd = open("/proc", O_RDONLY | O_DIRECTORY)) >= 0); 80 BPF_ASSERT(sandbox::SandboxBPF::SupportsSeccompSandbox(proc_fd) == 85 sandbox.set_proc_fd(proc_fd);
|
H A D | sandbox_bpf.h | 88 // "proc_fd" should be a file descriptor for "/proc", or -1 if not 90 static SandboxStatus SupportsSeccompSandbox(int proc_fd); 97 void set_proc_fd(int proc_fd); 211 int proc_fd() { return proc_fd_; } function in class:sandbox::SandboxBPF
|
H A D | sandbox_bpf.cc | 97 bool IsSingleThreaded(int proc_fd) { argument 98 if (proc_fd < 0) { 106 if ((task = openat(proc_fd, "self/task", O_RDONLY | O_DIRECTORY)) < 0 || 376 SandboxBPF::SandboxStatus SandboxBPF::SupportsSeccompSandbox(int proc_fd) { argument 386 if (!IsSingleThreaded(proc_fd)) { 392 if (status_ == STATUS_UNAVAILABLE && IsSingleThreaded(proc_fd)) { 416 sandbox.set_proc_fd(proc_fd); 424 if (status_ == STATUS_AVAILABLE && !IsSingleThreaded(proc_fd)) { 431 void SandboxBPF::set_proc_fd(int proc_fd) { proc_fd_ = proc_fd; } argument [all...] |
H A D | demo.cc | 415 int proc_fd = open("/proc", O_RDONLY|O_DIRECTORY); local 416 if (SandboxBPF::SupportsSeccompSandbox(proc_fd) != 422 sandbox.set_proc_fd(proc_fd);
|
/external/chromium_org/components/nacl/loader/ |
H A D | nacl_helper_linux.cc | 181 int proc_fd = open("/proc/self/exe", O_RDONLY); local 182 if (proc_fd >= 0) { 183 close(proc_fd);
|
/external/chromium_org/content/common/sandbox_linux/ |
H A D | sandbox_linux.cc | 82 // Try to open /proc/self/task/ with the help of |proc_fd|. |proc_fd| can be 84 int OpenProcTaskFd(int proc_fd) { argument 86 if (proc_fd >= 0) { 89 proc_self_task = openat(proc_fd, "self/task/", O_RDONLY | O_DIRECTORY);
|
Completed in 486 milliseconds