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

Unified Diff: sandbox/linux/seccomp-bpf/util.cc

Issue 10878033: Simplified unit testing of sandboxing code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing parameter that suppresses benign error messages Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc ('k') | sandbox/linux/tests/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp-bpf/util.cc
diff --git a/sandbox/linux/seccomp-bpf/util.cc b/sandbox/linux/seccomp-bpf/util.cc
index 3d3233bc216f377850fe248b03f91bd2636690b1..ac751460b9cecc7a7c58b35b79bdce66f4c0c44e 100644
--- a/sandbox/linux/seccomp-bpf/util.cc
+++ b/sandbox/linux/seccomp-bpf/util.cc
@@ -120,7 +120,7 @@ void Util::closeAllBut(int fd, ...) {
int fdir;
if ((proc_fd = Sandbox::getProcFd()) < 0 ||
(fdir = openat(proc_fd, "self/fd", O_RDONLY|O_DIRECTORY)) < 0) {
- Sandbox::die("Cannot access \"/proc/self/fd\"");
+ SANDBOX_DIE("Cannot access \"/proc/self/fd\"");
}
int dev_null = open("/dev/null", O_RDWR);
DIR *dir = fdopendir(fdir);
@@ -140,7 +140,7 @@ void Util::closeAllBut(int fd, ...) {
// then we are better off leaving the standard descriptors open.
if (dev_null >= 0) {
if (HANDLE_EINTR(dup2(dev_null, i))) {
- Sandbox::die("Cannot dup2()");
+ SANDBOX_DIE("Cannot dup2()");
}
}
} else {
« no previous file with comments | « sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc ('k') | sandbox/linux/tests/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698