Browse Source

Log the errno value if seccomp_load() fails.

(This is how I found out I was trying to test with a kernel too old
for seccomp. I think.)
Nick Mathewson 10 years ago
parent
commit
f0945ac270
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/common/sandbox.c

+ 2 - 1
src/common/sandbox.c

@@ -1470,7 +1470,8 @@ install_syscall_filter(sandbox_cfg_t* cfg)
 
   // loading the seccomp2 filter
   if ((rc = seccomp_load(ctx))) {
-    log_err(LD_BUG, "(Sandbox) failed to load!");
+    log_err(LD_BUG, "(Sandbox) failed to load: %d (%s)!", rc,
+            strerror(-rc));
     goto end;
   }