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

/external/chromium_org/sandbox/linux/services/
H A Dcredentials.h31 // 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);
H A Dcredentials_unittest.cc61 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...]
H A Dcredentials.cc176 int Credentials::CountOpenFds(int proc_fd) { argument
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) { argument
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/
H A Dsandbox_bpf_test_runner.cc37 int proc_fd; local
38 SANDBOX_ASSERT((proc_fd = open("/proc", O_RDONLY | O_DIRECTORY)) >= 0);
39 SANDBOX_ASSERT(sandbox::SandboxBPF::SupportsSeccompSandbox(proc_fd) ==
44 sandbox.set_proc_fd(proc_fd);
H A Dsandbox_bpf.h94 // "proc_fd" should be a file descriptor for "/proc", or -1 if not
96 static SandboxStatus SupportsSeccompSandbox(int proc_fd);
103 void set_proc_fd(int proc_fd);
205 int proc_fd() { return proc_fd_; } function in class:sandbox::SandboxBPF
H A Dsandbox_bpf.cc109 bool IsSingleThreaded(int proc_fd) { argument
110 if (proc_fd < 0) {
118 if ((task = openat(proc_fd, "self/task", O_RDONLY | O_DIRECTORY)) < 0 ||
381 SandboxBPF::SandboxStatus SandboxBPF::SupportsSeccompSandbox(int proc_fd) { argument
391 if (!IsSingleThreaded(proc_fd)) {
397 if (status_ == STATUS_UNAVAILABLE && IsSingleThreaded(proc_fd)) {
421 sandbox.set_proc_fd(proc_fd);
429 if (status_ == STATUS_AVAILABLE && !IsSingleThreaded(proc_fd)) {
436 void SandboxBPF::set_proc_fd(int proc_fd) { proc_fd_ = proc_fd; } argument
[all...]
H A Ddemo.cc428 int proc_fd = open("/proc", O_RDONLY|O_DIRECTORY); local
429 if (SandboxBPF::SupportsSeccompSandbox(proc_fd) !=
435 sandbox.set_proc_fd(proc_fd);
/external/chromium_org/v8/src/
H A Dplatform-qnx.cc180 int proc_fd, num, i; local
190 if ((proc_fd = open(buf, O_RDONLY)) == -1) {
191 close(proc_fd);
196 if (devctl(proc_fd, DCMD_PROC_MAPINFO, NULL, 0, &num) != EOK) {
197 close(proc_fd);
204 close(proc_fd);
209 if (devctl(proc_fd, DCMD_PROC_PAGEDATA,
212 close(proc_fd);
220 if (devctl(proc_fd, DCMD_PROC_MAPDEBUG, &map, sizeof(map), 0) != EOK) {
228 close(proc_fd);
[all...]
/external/chromium_org/components/nacl/loader/sandbox_linux/
H A Dnacl_sandbox_linux.cc34 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/
H A Dsandbox_linux.cc91 // Try to open /proc/self/task/ with the help of |proc_fd|. |proc_fd| can be
93 int OpenProcTaskFd(int proc_fd) { argument
95 if (proc_fd >= 0) {
98 proc_self_task = openat(proc_fd, "self/task/", O_RDONLY | O_DIRECTORY);

Completed in 171 milliseconds