Bug 233736

Summary: net/torsocks: Unsupported syscall errors in version 2.3.0
Product: Ports & Packages Reporter: Stefan Ehmann <shoesoft>
Component: Individual Port(s)Assignee: Yuri Victorovich <yuri>
Status: Closed FIXED    
Severity: Affects Only Me CC: manas, ndowens
Priority: --- Flags: bugzilla: maintainer-feedback? (yuri)
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://trac.torproject.org/projects/tor/ticket/28688
Description Flags
updated syscall patch none

Description Stefan Ehmann 2018-12-02 22:02:10 UTC
After upgrading to torsocks-2.3.0, I get an error when using torify:

$ torify git clone https://github.com/freebsd/poudriere.git
1543787510 WARNING torsocks[25796]: [syscall] Unsupported syscall number 20. Denying the call (in tsocks_syscall() at syscall.c:568)
Cloning into 'poudriere'...
1543787510 WARNING torsocks[25796]: [syscall] Unsupported syscall number 2. Denying the call (in tsocks_syscall() at syscall.c:568)
error: cannot fork() for git-remote-https: Function not implemented

The same command works with torsocks 2.2.0.

syscall number 2 is fork. There have been some changes to syscall.c which may cause this issue.
Comment 1 Nathan 2018-12-02 23:59:05 UTC
Created attachment 199769 [details]

Try this patch, if it works; we can update the port and fix this
Comment 2 Yuri Victorovich freebsd_committer 2018-12-03 00:24:50 UTC
(In reply to Nathan from comment #1)

Hi Nathan,

This patch doesn't apply, because this file is already patched for accept4 vs. accept by the port patch. It doesn't even contain the notion of 'accept4' any more.

Comment 3 Manas Bhatnagar 2018-12-14 19:06:34 UTC
I see this issue too, I have locked the torsocks package on my systems for the time being.
Comment 4 Stefan Ehmann 2019-03-05 21:02:10 UTC
Created attachment 202618 [details]
updated syscall patch

files/patch-src_lib_torsocks.c was deleted during the upgrade to 2.3.0 but patching still seems to be necessary.

Attached is a version that applies against torsocks 2.3.0. At least my use case is working again.
Comment 5 Yuri Victorovich freebsd_committer 2019-03-06 05:00:41 UTC
Thank you for the patch!
Comment 6 commit-hook freebsd_committer 2019-03-06 05:01:01 UTC
A commit references this bug:

Author: yuri
Date: Wed Mar  6 05:00:28 UTC 2019
New revision: 494775
URL: https://svnweb.freebsd.org/changeset/ports/494775

  net/torsocks: Fix unsupported syscall errors in version 2.3.0

  PR:		233736
  Submitted by:	Stefan Ehmann <shoesoft@gmx.net>