#576301 tsocks: fails if socksified application uses poll(2) (e.g. subversion-1.5)

Package:
tsocks
Source:
tsocks
Description:
transparent network access through a SOCKS 4 or 5 proxy
Submitter:
Ingo Hadan
Date:
2013-10-30 22:06:04 UTC
Severity:
important
#576301#5
Date:
2010-04-02 19:08:50 UTC
From:
To:
There is a bug in tsocks wrapper of the poll(2) system call which
prevents tsocks from working with apps that use poll(2) to wait for data
on the socket. As a consequence, the connections initiated by the
application never come up and, finally, time out. This has been observed
with subversion/stable and with java applications (with the sun-jvm).

I could fix the bug - at least it works now for all applications that I
use together with tsocks. (That is, it at least works with mutt,
subversion, ssh.) The fix is contained in the attached patch.

#576301#10
Date:
2010-04-27 10:58:45 UTC
From:
To:
I confirm there is same problem with PHP.
Supplied patch fixes the problem.

#576301#15
Date:
2013-04-25 23:57:26 UTC
From:
To:
Hi,

Ingo's patch is correct according to my understanding of tsocks' dirty code,
note that there also is a related copy/paste error from select() a few lines above,
which causes a supplementary poll(_, POLLOUT, _) call.

An updated fix is contained in the attached patch.
Please include.

#576301#20
Date:
2013-10-30 22:03:04 UTC
From:
To:
A tested patch is available.  Time to apply it to the debian package?