Nick Mathewson
e8cc9f3edf
Merge branch 'maint-0.2.7' into maint-0.2.8
2016-05-12 15:33:47 -04:00
Nick Mathewson
4165b1a0da
Merge branch 'bug18977_026_v2' into maint-0.2.7
2016-05-12 15:33:35 -04:00
Nick Mathewson
20b01cece8
Merge branch 'bug18977_024_v2' into bug18977_026_v2
...
Had conflicts related to other correct_tm bugs in 0.2.6. Added wday
for another case.
2016-05-12 14:39:06 -04:00
Nick Mathewson
e57f26c135
Have correct_tm set tm_wday as well.
...
The tm_wday field had been left uninitialized, which was causing
some assertions to fail on Windows unit tests.
Fixes bug 18977.
2016-05-12 14:37:27 -04:00
Nick Mathewson
9fc472e1a8
clean/extend some module docs, including fix from #18403
2016-02-28 17:57:47 +01:00
Nick Mathewson
57699de005
Update the copyright year.
2016-02-27 18:48:19 +01:00
Nick Mathewson
5cd6c577df
Merge branch 'bug17852_revised'
2016-02-16 11:34:06 -05:00
Nick Mathewson
39a86185c8
Correct further grammatical errors in tor comments
...
Avoid using a pronoun where it makes comments unclear.
Avoid using gender for things that don't have it.
Avoid assigning gender to people unnecessarily.
2016-01-27 08:51:28 -05:00
Ola Bini
5edd431d92
Add tests for options_act
2016-01-13 10:31:13 -05:00
cypherpunks
759e6f8afb
Improve warning message
...
The user parameter is not checked so we do not know the user has been
specified.
2015-12-17 08:34:27 -05:00
Nick Mathewson
aba39ea390
Merge branch 'feature8195_small_squashed'
2015-12-15 13:11:06 -05:00
Nick Mathewson
405a8d3fb4
Update KeepCapabilities based on comments from asn
...
* The option is now KeepBindCapabilities
* We now warn if the user specifically asked for KeepBindCapabilities
and we can't deliver.
* The unit tests are willing to start.
* Fewer unused-variable warnings.
* More documentation, fewer misspellings.
2015-12-15 13:10:57 -05:00
Nick Mathewson
e8cc839e41
Add ability to keep the CAP_NET_BIND_SERVICE capability on Linux
...
This feature allows us to bind low ports when starting as root and
switching UIDs.
Based on code by David Goulet.
Implement feature 8195
2015-12-15 13:10:57 -05:00
cypherpunks
824a6a2a90
Replace usage of INLINE with inline
...
This patch was generated using;
sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]
2015-12-15 11:34:00 -05:00
Jeremy
b3639c8291
src/common/compat.c:tor_vasprintf() - vsnprintf() was properly checked but tor_vsnprintf() available so why not use it?
2015-12-01 13:00:58 -05:00
Jeremy
fcc6541fde
src/common/compat.c:tor_vasprintf() - changed vsnprintf() to tor_vsnprintf() which ensures string is null terminated.
2015-12-01 12:27:29 -05:00
Nick Mathewson
eedef41944
use sockaddr_storage for stack-allocated sockets in ersatz socketpair
2015-11-27 11:52:59 -05:00
Nick Mathewson
f108be7c25
Make SIZEOF_SOCKADDR return socklen_t to avoid bad compares.
2015-11-27 11:48:54 -05:00
Nick Mathewson
a45aacd2e2
Use uint16_t, not in_port_t (which does not exist on Windows). See #17638 .
2015-11-27 11:39:03 -05:00
Nick Mathewson
cbc1b8a4f7
fix "make check-spaces"
2015-11-20 10:52:56 -05:00
teor (Tim Wilson-Brown)
53ec840bdf
Make tor_ersatz_socketpair work on IPv6-only systems
...
(But it won't work on some systems without IPv4/IPv6 localhost
(some BSD jails) by design, to avoid creating sockets on routable
IP addresses. However, those systems likely have the AF_UNIX socketpair,
which tor prefers.)
Fixes bug #17638 ; bugfix on a very early tor version,
earlier than 22dba27d8d
(23 Nov 2004) / svn:r2943.
Patch by "teor".
2015-11-19 19:08:22 +11:00
Sebastian Hahn
5cf24ff3af
Fix a bunch of check-spaces complaints
2015-08-21 10:36:53 -04:00
Nick Mathewson
69f7f9b0d4
Fix windows compilation
2015-08-11 09:09:06 -04:00
Nick Mathewson
81e0fd8360
Merge remote-tracking branch 'public/feature16734'
2015-08-10 15:14:49 -04:00
Nick Mathewson
50049df0d4
Add a compat function to check how much disk space is free.
...
Closes ticket 16734.
2015-08-05 14:01:49 -04:00
David Goulet
79798a2363
Set the open file limit to the current value before changing it
...
If setrlimit() failed, max_out wasn't set in set_max_file_descriptors()
ending in a state where we don't use ULIMIT_BUFFER for things like tor
private key files.
Also fix the set_max_file_descriptors() documentation.
Fixes #16274
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-08-05 13:17:33 -04:00
David Goulet
8c83e8cec0
Add get_max_sockets() and remove dead code
...
The control port was using set_max_file_descriptors() with a limit set to 0
to query the number of maximum socket Tor can use. With the recent changes
to that function, a check was introduced to make sure a user can not set a
value below the amount we reserved for non socket.
This commit adds get_max_sockets() that returns the value of max_sockets so
we can stop using that "setter" function to get the current value.
Finally, the dead code is removed that is the code that checked for limit
equal to 0. From now on, set_max_file_descriptors() should never be used
with a limit set to 0 for a valid use case.
Fixes #16697
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-07-30 15:21:12 -04:00
Nick Mathewson
b5cfcb2045
Fix most check-spaces issues
2015-07-16 11:10:14 -04:00
Nick Mathewson
19f9803f8e
Okay, this time it was my fault
2015-07-12 15:44:43 -04:00
Nick Mathewson
58cd21f601
Fine, mingw! fine! are you happy now??
2015-07-12 15:30:35 -04:00
Nick Mathewson
7ed477786c
This should be the last SecureZeroMemory fix
2015-07-12 15:14:52 -04:00
Nick Mathewson
9f21c85e04
Dammit, autoconf!
2015-07-12 15:02:43 -04:00
Nick Mathewson
db88d91ebe
Nth time is maybe the charm for fixing windows readpassword build errors
2015-07-12 14:34:11 -04:00
Nick Mathewson
de397d57c9
note some dead code in set_max_file_descriptors
2015-07-11 16:53:32 -04:00
Nick Mathewson
d18215ed16
Try one more one more time to get tor-ci-windows working
...
Apparently its mingw headers are missing some stuff.
2015-07-10 09:59:29 -04:00
Nick Mathewson
ad0d181854
Attempt yet again to make the tor-ci-windows builder happy
2015-07-10 09:16:32 -04:00
teor
57c61f39a0
Always use the sandbox in tor_open_cloexec
...
Use the sandbox in tor_open_cloexec, whether or not O_CLOEXEC is defined.
Patch by "teor". Fix on 0.2.3.1-alpha.
2015-07-08 02:17:31 +10:00
Nick Mathewson
877354a9af
Try a little harder to fix the tor-ci-windows builder, or figure out why it is broke
2015-06-29 16:09:37 -04:00
Nick Mathewson
229bb7e50f
Fix some compilation issues.
2015-06-27 14:27:00 -04:00
Nick Mathewson
3149bfc254
Merge branch 'bug16288_027_03_squashed'
2015-06-25 11:30:52 -04:00
David Goulet
699acd8d54
Validate the open file limit when creating a socket
...
Fixes #16288
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-06-25 11:30:47 -04:00
Nick Mathewson
272229ff5d
Remove janky getpass implementations
2015-06-25 10:52:47 -04:00
Nick Mathewson
a64f2d167e
Add a getpass implementation for windows that won't totally suck
...
The logic here is inspired by Python's win_getpass(), which I'm
assuming is better than nothing.
2015-06-25 10:52:47 -04:00
Nick Mathewson
b9b658e727
Add the openssh 6.8p1 readpassphrase implementation
...
This way glibc users don't have to fall back to getpass.
Windows users are still out of luck
2015-06-17 10:41:22 -04:00
Nick Mathewson
cbdf2c5d8f
Add a tor_getpass to read passphrases. Needs better backend.
2015-06-17 10:11:18 -04:00
Nick Mathewson
30e933b136
Merge branch 'ticket14710_squashed'
2015-03-31 14:37:09 -04:00
rl1987
a4f89e21a6
Whitebox test for get_interface_address6_via_udp_socket_hack().
...
Also, fix some whitespace mishaps.
2015-03-31 14:37:02 -04:00
Nick Mathewson
251f6cfcd8
Quiet "caching debian-tor for debian-tor" notice
2015-02-19 12:30:34 -05:00
Nick Mathewson
5c820def99
Merge remote-tracking branch 'sysrqb/bug14802_025'
2015-02-09 22:39:55 -08:00
Matthew Finkel
9ae321db66
Return 0 when detecting the amount of memory fails
...
Fixes bug 14802; bugfix on 0.2.5.4-alpha.
2015-02-09 02:06:18 +00:00