Searched refs:proc_fd (Results 1 - 9 of 9) sorted by relevance

/external/chromium_org/sandbox/linux/services/
H A Dcredentials.h34 // 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 Dcredentials_unittest.cc77 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 Dcredentials.cc159 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 Dbpf_tests.h78 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 Dsandbox_bpf.h88 // "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 Dsandbox_bpf.cc97 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 Ddemo.cc415 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 Dnacl_helper_linux.cc181 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 Dsandbox_linux.cc82 // 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