In a nutshell, tsocks is working when I
put "/lib/libtsocks.so" in /etc/ld.so.preload, but not when
I export it in my user profile. Here are some examples of
my output:
******************************************
For all users:
$ curl 10.15.78.44
17:41:12 libtsocks(24188): SOCKS V5 connect failed:
17:41:12 libtsocks(24188): Connection refused
curl: (7) Connection refused
For one user:
$ curl 10.15.78.44
17:18:04 libtsocks(24114): SOCKS V5 connect failed:
17:18:04 libtsocks(24114): General SOCKS server failure
curl: (7) Software caused connection abort
(The connect is failing both times, but the top one is
failing for the right reason)
******************************************
For all users:
$ ssh 10.15.78.44
LEGAL WARNING
Authorized Use Only. Use is subject to audit at any
time.joe@10.15.78.44's password:
For one user:
$ ssh 10.15.78.44
ssh: connect to address 10.15.78.44 port 22:
Connection timed out
******************************************
For all users:
$ sftp 10.15.78.44:file .
Connecting to 10.15.78.44...
LEGAL WARNING
Authorized Use Only. Use is subject to audit at any
time.Fetching admintools://admintools://file to ./file
For one user:
$ sftp 10.15.78.44:file .
Connecting to 10.15.78.44...
ssh: connect to address 10.15.78.44 port 22:
Connection timed out
Couldn't read packet: Connection reset by peer
******************************************
I'd think that tsocks wasn't being called properly when
it's only used by one user, but the curl example shows
that it's at least trying to use it. And I'd think that ssh
and sftp weren't working because of the suid issues,
etc., but they're working fine when all users are using
tsocks. (And it's a non-root user successfully using ssh
in that case.) Can you please give my any suggestions?
(Some things I've already ruled out: tsocks.conf is
identical in both cases. Confirmed that LD_PRELOAD
environment variable is being set correctly. Can
successfully telnet to socks server in both cases.)