Bladeren bron

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 jaren geleden
bovenliggende
commit
f0945ac270
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  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;
   }