<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/dgoulet/torsocks, branch v2.0.0-rc7</title>
<subtitle>David's torsocks repository</subtitle>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/dgoulet/torsocks.git/'/>
<entry>
<title>Update version to v2.0.0-rc7</title>
<updated>2014-04-04T22:12:46+00:00</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@ev0ke.net</email>
</author>
<published>2014-04-04T22:12:46+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/dgoulet/torsocks.git/commit/?id=91c148690e4c8bd1e5e948f0c758570891f49ddd'/>
<id>91c148690e4c8bd1e5e948f0c758570891f49ddd</id>
<content type='text'>
Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix: fix NULL dereference on error</title>
<updated>2014-04-03T21:40:23+00:00</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@ev0ke.net</email>
</author>
<published>2014-04-03T21:40:23+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/dgoulet/torsocks.git/commit/?id=dcbdeb2093e46e2a74293f03d15d8e202d322a06'/>
<id>dcbdeb2093e46e2a74293f03d15d8e202d322a06</id>
<content type='text'>
Fixes coverity issue 1195182.

Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes coverity issue 1195182.

Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix: memory leak in connect error path</title>
<updated>2014-04-03T21:36:01+00:00</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@ev0ke.net</email>
</author>
<published>2014-04-03T21:36:01+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/dgoulet/torsocks.git/commit/?id=e70264869c19e0ff44ecf5898858af37e7a9fabd'/>
<id>e70264869c19e0ff44ecf5898858af37e7a9fabd</id>
<content type='text'>
Fixes coverity issue 1072757.

Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes coverity issue 1072757.

Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Delete old source directory</title>
<updated>2014-04-01T01:23:51+00:00</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@ev0ke.net</email>
</author>
<published>2014-04-01T01:23:51+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/dgoulet/torsocks.git/commit/?id=f4f9ee87e4ab0aec3ce683c9be0131e68da96688'/>
<id>f4f9ee87e4ab0aec3ce683c9be0131e68da96688</id>
<content type='text'>
Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix: nullify constant that might be undefined</title>
<updated>2014-04-01T00:08:33+00:00</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@ev0ke.net</email>
</author>
<published>2014-04-01T00:08:33+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/dgoulet/torsocks.git/commit/?id=62dab5b2ca9fc1a5e92d07feabf70851420de371'/>
<id>62dab5b2ca9fc1a5e92d07feabf70851420de371</id>
<content type='text'>
Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor the connect() code flow for clarity</title>
<updated>2014-03-31T23:58:28+00:00</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@ev0ke.net</email>
</author>
<published>2014-03-31T23:55:47+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/dgoulet/torsocks.git/commit/?id=aba207d0033ae149bfa19c2dfeb0823af6a2ebc3'/>
<id>aba207d0033ae149bfa19c2dfeb0823af6a2ebc3</id>
<content type='text'>
This adds a "validate_socket()" function that is called first to make
sure all criteria of a valid socket that torsocks can handle are met.
This has been done to have a single callsite that can do this validation
thus improving the clarity and flow of the code.

It now also returns EPERM for things that we deny instead of EINVAL or
EBADF. Because of that, the connect test has been changed to handle this
new errno value.

Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a "validate_socket()" function that is called first to make
sure all criteria of a valid socket that torsocks can handle are met.
This has been done to have a single callsite that can do this validation
thus improving the clarity and flow of the code.

It now also returns EPERM for things that we deny instead of EINVAL or
EBADF. Because of that, the connect test has been changed to handle this
new errno value.

Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: add connect() test</title>
<updated>2014-03-31T23:14:48+00:00</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@ev0ke.net</email>
</author>
<published>2014-03-31T22:56:10+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/dgoulet/torsocks.git/commit/?id=4e142e770791c56d14af826a7a48d0a6f1bed44d'/>
<id>4e142e770791c56d14af826a7a48d0a6f1bed44d</id>
<content type='text'>
Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: add socket() test</title>
<updated>2014-03-31T23:14:45+00:00</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@ev0ke.net</email>
</author>
<published>2014-03-31T17:49:43+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/dgoulet/torsocks.git/commit/?id=df40ceaaa17dbe4fb5431f6cb41bc1560192f9cb'/>
<id>df40ceaaa17dbe4fb5431f6cb41bc1560192f9cb</id>
<content type='text'>
Add unit test for socket() and socketpair().

Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add unit test for socket() and socketpair().

Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix: socketpair() denied for INET[6] socket</title>
<updated>2014-03-31T23:14:04+00:00</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@ev0ke.net</email>
</author>
<published>2014-03-31T19:58:15+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/dgoulet/torsocks.git/commit/?id=44748d5103be53801212ed9feeffaddc30ea420a'/>
<id>44748d5103be53801212ed9feeffaddc30ea420a</id>
<content type='text'>
The SOCK_STREAM check was wrong since you could pass SOCK_DGRAM and
match the check so the socketpair() now denies INET/INET6 socket.

Note that socketpair() only supports AF_UNIX and AF_LOCAL on most *nix
system.

Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SOCK_STREAM check was wrong since you could pass SOCK_DGRAM and
match the check so the socketpair() now denies INET/INET6 socket.

Note that socketpair() only supports AF_UNIX and AF_LOCAL on most *nix
system.

Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix: socket() type check SOCK_STREAM</title>
<updated>2014-03-31T23:12:46+00:00</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@ev0ke.net</email>
</author>
<published>2014-03-31T17:49:32+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.torproject.org/user/dgoulet/torsocks.git/commit/?id=3b8687973757cbecfe22a7e5708da15523111c55'/>
<id>3b8687973757cbecfe22a7e5708da15523111c55</id>
<content type='text'>
Even though connect() makes a check, deny socket creation that are
INET/INET6 but NOT of type SOCK_STREAM. This fix makes our wrapper
handle socket type flags that can be passed to the kernel such as
SOCK_NONBLOCK and SOCK_CLOEXEC.

Furthermore, the type check was *not* right since having a type set to
SOCK_DGRAM also matches SOCK_STREAM when using the &amp; operator.

A unit test is added for the IS_SOCK_STREAM(type) macro that test if a
socket type is a SOCK_STREAM.

Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Even though connect() makes a check, deny socket creation that are
INET/INET6 but NOT of type SOCK_STREAM. This fix makes our wrapper
handle socket type flags that can be passed to the kernel such as
SOCK_NONBLOCK and SOCK_CLOEXEC.

Furthermore, the type check was *not* right since having a type set to
SOCK_DGRAM also matches SOCK_STREAM when using the &amp; operator.

A unit test is added for the IS_SOCK_STREAM(type) macro that test if a
socket type is a SOCK_STREAM.

Signed-off-by: David Goulet &lt;dgoulet@ev0ke.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
