]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
bug fix: syscalls send and recv not supported for x86_64 with libseccomp 1.0.1
authorCristian Toader <cristian.matei.toader@gmail.com>
Thu, 12 Sep 2013 12:30:28 +0000 (15:30 +0300)
committerCristian Toader <cristian.matei.toader@gmail.com>
Thu, 12 Sep 2013 12:30:28 +0000 (15:30 +0300)
src/common/sandbox.c

index dc8885e1851b1d4215378831d700075810c07db2..db2ad1d6ff912aac07f1465af0b9478735fb6f25 100644 (file)
@@ -129,12 +129,19 @@ static int filter_nopar_gen[] = {
     SCMP_SYS(bind),
     SCMP_SYS(connect),
     SCMP_SYS(getsockname),
-    SCMP_SYS(recv),
     SCMP_SYS(recvmsg),
     SCMP_SYS(recvfrom),
     SCMP_SYS(sendto),
-    SCMP_SYS(send),
     SCMP_SYS(unlink)
+
+    /*
+     * These syscalls are not required on x86_64 and not supported with
+     * some libseccomp versions (eg: 1.0.1)
+     */
+#if defined(__i386)
+    SCMP_SYS(recv),
+    SCMP_SYS(send),
+#endif
 };
 
 /**