[tor-commits] [tor/master] Log the errno value if seccomp_load() fails.

nickm at torproject.org nickm at torproject.org
Tue May 27 21:37:51 UTC 2014


commit f0945ac270d08da146b415513fc68c7782f071be
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue May 27 15:08:10 2014 -0400

    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.)
---
 src/common/sandbox.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index e34268c..7586c0c 100644
--- a/src/common/sandbox.c
+++ b/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;
   }
 





More information about the tor-commits mailing list