]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Log the errno value if seccomp_load() fails.
authorNick Mathewson <nickm@torproject.org>
Tue, 27 May 2014 19:08:10 +0000 (15:08 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 27 May 2014 21:34:52 +0000 (17:34 -0400)
(This is how I found out I was trying to test with a kernel too old
for seccomp. I think.)

src/common/sandbox.c

index e34268cdadfb51d3af410236b69689d5a66bf0c9..7586c0cb388ab824ab29d1f3894cab2920c54dda 100644 (file)
@@ -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;
   }