Nick Mathewson
a6f51001a5
New whitespace normalization rule: no blank line at EOF.
...
svn:r4378
2005-06-09 16:46:51 +00:00
Nick Mathewson
8b2a7ff9fe
Remove extraneous newlines from libevent log messages. Backport candidate?
...
svn:r4350
2005-06-08 17:41:32 +00:00
Nick Mathewson
1d9bc936c2
Adapt patch from Adam Langley: fix possible memory leak in tor_lookup_hostname
...
svn:r4326
2005-06-07 13:45:58 +00:00
Nick Mathewson
5420aed38e
Possible bugfix for 151: backport candidate.
...
svn:r4318
2005-06-06 20:02:09 +00:00
Nick Mathewson
ea5591ee4d
Implement --disable-threads
...
svn:r4187
2005-05-10 20:02:52 +00:00
Nick Mathewson
10b2208d93
Make Tor compile with no warnings with gcc4.0 on OSX
...
svn:r4184
2005-05-07 05:55:06 +00:00
Roger Dingledine
50505e677e
fix a comment
...
svn:r4157
2005-05-02 21:49:04 +00:00
Roger Dingledine
509405a5f7
clean up this TOR_FRAGILE business
...
svn:r4116
2005-04-26 18:52:16 +00:00
Nick Mathewson
4fb95f166e
Apparently, ASN1 failures are not treated as SSL connection errors, but are just general OpenSSL errors. Or something. Anyway, bulletproof tor_tls_handshake.
...
svn:r4098
2005-04-23 20:35:38 +00:00
Roger Dingledine
54fd9df23f
LOG_ERR is for when you're planning to die.
...
svn:r4087
2005-04-23 14:35:13 +00:00
Nick Mathewson
5827e2e216
Fix "JAP-client" hideous ASN1 bug, twice. (Fix1: check more thoroughly for TLS errors when handling certs. Fix2: stop assert(0)ing on uncaught TLS errors.)
...
svn:r4085
2005-04-23 14:26:02 +00:00
Nick Mathewson
f3b833cb47
Make libevent_logging_callback static.
...
svn:r4058
2005-04-08 03:47:18 +00:00
Roger Dingledine
8aa0df56f6
Stop putting nodename in the Platform string of server descriptors.
...
It doesn't actually help, and it is confusing/upsetting some people.
svn:r4037
2005-04-06 21:11:05 +00:00
Roger Dingledine
652dde72f1
bugfix: chdir to your datadirectory at the *end* of the
...
daemonize process, not the beginning. this was a problem
because the first time you run tor, if your datadir isn't
there, and you have runasdaemon set to 1, it will try to
chdir to it before it tries to create it. oops.
svn:r4033
2005-04-06 19:07:38 +00:00
Nick Mathewson
4991290935
Revise control spec and implementation to allow all log messages to be sent to controller with their severities intact.
...
svn:r4010
2005-04-05 22:56:17 +00:00
Nick Mathewson
7bf443e985
I hear the smart kinds compile before committing. Then they never miss parens
...
svn:r3999
2005-04-03 06:00:00 +00:00
Nick Mathewson
f696fd98bf
Make smartlist_string_remove consistent with smartlist_string
...
svn:r3998
2005-04-03 05:58:23 +00:00
Nick Mathewson
ff545c3103
Add useful smartlist_string_remove function.
...
svn:r3996
2005-04-03 05:52:32 +00:00
Nick Mathewson
2a332bf0b8
Fix unterminated comment
...
svn:r3991
2005-04-03 05:21:16 +00:00
Nick Mathewson
0e81265359
update copyright notices.
...
svn:r3982
2005-04-01 20:15:56 +00:00
Nick Mathewson
73f6c1531e
fix typo in earlier libevent mmessage suppress patch
...
svn:r3950
2005-04-01 07:16:52 +00:00
Nick Mathewson
410ecfcc71
Add code to suppress spurious libevent log msgs; use it to resolve bug 68.
...
svn:r3948
2005-04-01 07:05:21 +00:00
Nick Mathewson
efe9ca659a
Use recent libevent features when possible
...
svn:r3940
2005-04-01 02:37:40 +00:00
Nick Mathewson
837d7dff69
Try to make crash-on-shutdown bug harder to trigger.
...
svn:r3939
2005-04-01 02:37:10 +00:00
Roger Dingledine
4a82ac12b8
add a tor_tls_is_server method to remember if conn->tls
...
was an initiator or a receiver
svn:r3931
2005-03-31 07:46:38 +00:00
Roger Dingledine
80901fde69
remember some thoughts about using WSAStartup to learn
...
how many sockets we get to use on win32.
svn:r3905
2005-03-28 01:11:02 +00:00
Nick Mathewson
905c16846a
Fix a few more instances of memory not freed on exit (found by weasel).
...
svn:r3830
2005-03-23 06:20:50 +00:00
Roger Dingledine
248867caf5
bugfix: make smartlist_join_strings2 actually use the separator/terminator
...
svn:r3805
2005-03-22 05:37:59 +00:00
Nick Mathewson
df9c8feac7
Commit fixes for several pending tor core tasks: document all DOCDOCed functions; time out uncontrolled unattached streams; feed reasons to SOCKS5 (refactoring connection_ap_handshake_socks_reply in the process); change DirFetchPeriod/StatusFetchPeriod to have a special "Be smart" value.
...
svn:r3769
2005-03-17 12:38:37 +00:00
Nick Mathewson
be38e0a490
Fix a fun windows bug: apparently windows stat wants paths not to end with slash.
...
svn:r3766
2005-03-16 00:04:59 +00:00
Nick Mathewson
0197b47ce9
Fix some more obscure compiler warnings
...
svn:r3758
2005-03-14 03:28:46 +00:00
Nick Mathewson
97dad670ea
Renormalize whitespace
...
svn:r3757
2005-03-14 03:18:35 +00:00
Nick Mathewson
c185825585
Finish implementing GETINFO; make it easy to query address maps.
...
svn:r3732
2005-03-03 06:37:54 +00:00
Nick Mathewson
97bc49bd72
Try a little harder to avoid openssl SSL* double-free reports.
...
svn:r3710
2005-02-28 02:52:51 +00:00
Nick Mathewson
0a2be3c9d8
Fix strmap_free to release memory actually held by the strmap.
...
svn:r3708
2005-02-28 02:21:40 +00:00
Nick Mathewson
bed6c05453
give a better warning when tor points at an https server.
...
svn:r3706
2005-02-28 01:55:09 +00:00
Nick Mathewson
2be0508f0d
Be specific about which "illegal character" we just saw in the cert.
...
svn:r3699
2005-02-25 21:05:42 +00:00
Nick Mathewson
bbaa3c7792
Implement more control spec functionality
...
- Mapaddress
- Postdescriptor
- GetInfo on descriptors
Required changes elsewhere:
- Keep the most recent running_routers_t in the routerlist_t. That way we
can learn about new routers and remember whether we were last told that
they were up or down. Also enables more simplifications.
- Keep the signed descriptor inside routerinfo_t. This makes
descriptor_entry_t in dirservers.c unneeded.
- Rename AddressMap (the verb) to MapAddress. Keep AddressMap as a noun.
- Check addresses for plausibility before mapping them.
svn:r3696
2005-02-25 20:46:13 +00:00
Roger Dingledine
55c3f15ed1
Forward-port the trick to bump up ConnLimit as far as it can
...
go, but not past MAXCONNECTIONS. Also throw away the FAKE_POLL
caveats since 0.1.0 doesn't need it any more.
svn:r3657
2005-02-22 23:52:44 +00:00
Nick Mathewson
6e6d95b3db
Change from inet_ntoa to a threadproof tor_inet_ntoa.
...
svn:r3656
2005-02-22 08:18:36 +00:00
Nick Mathewson
e8da6b26b6
Note a non-bug in read_file_to_str as used. If we start to rely on it behaving differently, we need to change how it behaves. [Noticed by Chris Palmer]
...
svn:r3655
2005-02-22 07:18:46 +00:00
Nick Mathewson
d37f4dd8a9
But on windows, localtime and gmtime _are_ threadsafe.
...
svn:r3654
2005-02-22 07:09:17 +00:00
Nick Mathewson
70c3580f81
Patch to localtime/gmtime handling: use the _r variants where available. Use mutexes to fake _r where necessary. Make mutexes no-ops where no threading is enabled.
...
svn:r3653
2005-02-22 07:03:03 +00:00
Nick Mathewson
d01718841e
Remove assumptions that maximum path length is anything like 1024. From comments by Chris Palmer
...
svn:r3652
2005-02-22 06:38:39 +00:00
Nick Mathewson
bb53a0bddd
remove spurious semicolons
...
svn:r3650
2005-02-22 04:55:19 +00:00
Nick Mathewson
d060f845f2
Snarf some logic from python, adapted to our own needs, to handle gethostbyname_r correctly across platforms.
...
svn:r3649
2005-02-22 04:50:31 +00:00
Nick Mathewson
a68fcbf807
Initial IRIX compatibility fixes: check for inttypes.h; check for platform cell_t.
...
svn:r3648
2005-02-22 04:26:45 +00:00
Nick Mathewson
6bd81c9ee2
Fix windows build: do not spuriously include openssl where not needed; handle lack of gethostbyname_r properly.
...
svn:r3644
2005-02-22 02:51:55 +00:00
Roger Dingledine
b5bddd8cfd
bugfix: actually use the argument to strmap_free()
...
svn:r3640
2005-02-20 23:12:20 +00:00
Roger Dingledine
596d65ec3b
avoid case (not yet triggered) where smartlists could grow out
...
of control
svn:r3636
2005-02-19 03:02:33 +00:00
Nick Mathewson
aac97a3c6a
Tell openssl how to use locks and how to find thread ids -- this may prevent race conditions surrounding the error queue.
...
svn:r3622
2005-02-13 22:32:25 +00:00
Nick Mathewson
f6221b695f
Apply windows patch from Dmitri Bely
...
svn:r3617
2005-02-12 21:03:37 +00:00
Nick Mathewson
5d836c8140
Free tls resources on exit too
...
svn:r3615
2005-02-11 01:41:19 +00:00
Nick Mathewson
915202048e
Handle return value from getaddrinfo properly
...
svn:r3526
2005-02-03 23:13:36 +00:00
Nick Mathewson
a035032f09
Use getaddrinfo and gethostbyname_r where available. Note that these are not necessarily threadsafe: this needs more thinking. Perhaps we should back down on this multithreading idea.
...
svn:r3522
2005-02-03 21:31:04 +00:00
Nick Mathewson
e4b21c97f7
Forward-port SGI Compatibility patches from Jan Schaumann
...
svn:r3517
2005-02-03 19:59:10 +00:00
Roger Dingledine
051cda803e
point out a potential thread/process leak problem when we're out of memory
...
svn:r3512
2005-02-03 07:35:24 +00:00
Peter Palfrader
ddd724ef94
Add --with-dmalloc configure option
...
svn:r3508
2005-02-03 07:25:10 +00:00
Roger Dingledine
f3b74a2adb
http://www.erlenstar.demon.co.uk/unix/faq_2.html says we
...
should call _exit, not exit, from child processes.
svn:r3506
2005-02-03 06:40:06 +00:00
Roger Dingledine
c53c7a0b4c
clarify what smartlist_remove promises, since we rely on it.
...
svn:r3473
2005-01-31 00:24:59 +00:00
Nick Mathewson
083b67cda5
Add rudimentary pthread support that needs more testing.
...
svn:r3439
2005-01-27 22:34:48 +00:00
Nick Mathewson
fbb7f869c5
fwd-port win32 isprint fix
...
svn:r3410
2005-01-22 00:42:58 +00:00
Roger Dingledine
2a908e5180
forward-port: fix win32 compile
...
svn:r3406
2005-01-22 00:35:09 +00:00
Roger Dingledine
a2e441da06
give a header file for ntohs
...
svn:r3388
2005-01-20 20:15:14 +00:00
Nick Mathewson
29b6637a62
Compilation fixes for win32 version detection.
...
svn:r3385
2005-01-20 19:03:09 +00:00
Nick Mathewson
432e313c81
Make zlib detection happy on little-endian platforms; fix unit tests.
...
svn:r3384
2005-01-20 19:02:35 +00:00
Nick Mathewson
f8c14bbf1f
Detect windows platform correctly
...
svn:r3377
2005-01-19 23:10:16 +00:00
Nick Mathewson
2c803bff9a
Make detect_compression_method work on platforms with more evil chars.
...
svn:r3376
2005-01-19 23:07:43 +00:00
Nick Mathewson
69fa5be7b6
Workaround for webservers that lie about Content-Encoding: Tor now tries to autodetect compressed directories and compression itself. (resolves bug 65)
...
svn:r3374
2005-01-19 22:40:33 +00:00
Nick Mathewson
324b192f68
Make Tor use Niels Provos's libevent instead of it's current
...
poll-but-sometimes-select mess. This will let us use faster async cores
(like epoll, kpoll, and /dev/poll), and hopefully work better on Windows
too.
There are some fairly nasty changes to main.c here; this will almost
certainly break something. But hey, that's what alphas are for.
svn:r3341
2005-01-12 06:42:32 +00:00
Roger Dingledine
51f47d746e
clean up smartlist_string_isin so callers don't have to manage bufs
...
themselves
svn:r3338
2005-01-12 04:53:53 +00:00
Roger Dingledine
74bc4e5af0
help avoid overflow from len_in + (len_in/n)*len_ins
...
nick, do you think this does it? if so, we should maybe backport too.
svn:r3334
2005-01-10 16:30:51 +00:00
Roger Dingledine
1f3e77bf92
make the initial temp log only notice-err, not info-err
...
svn:r3274
2005-01-04 02:25:18 +00:00
Roger Dingledine
9e6d6c6096
Bugfix: we've been using openssl's BIO_get_mem_data incorrectly.
...
We assumed the pem-encoded data written by PEM_write_bio_RSAPrivateKey
is nul-terminated, and at least sometimes, it's not.
svn:r3263
2005-01-03 22:35:40 +00:00
Nick Mathewson
b50263f740
More work on task #43 : fix race conditions on multithreaded (win32) servers.
...
svn:r3251
2005-01-03 19:07:25 +00:00
Nick Mathewson
ead52e0bdc
Possible fix for task #43 : when running on a multithreaded environment (currently only windows), threads should not close opposite sides of their socketpairs, and workers should not call connection_free_all(). This may fix win32 servers.
...
svn:r3247
2005-01-03 18:06:51 +00:00
Nick Mathewson
fca7ba9777
Resolve task 42: find where 19-char nicknames were getting truncated when read from certs, and fix it. Also audit use of MAX_NICKNAME_LEN; no other badness found, but some docs/code cleaned up a touch.
...
svn:r3244
2005-01-03 17:53:20 +00:00
Roger Dingledine
c3189c2573
fix an assert on startup when the disk is full and you're logging to a file
...
svn:r3204
2004-12-22 08:16:42 +00:00
Roger Dingledine
cf17d0d29c
move network_init from or/main to common/compat
...
call network_init in tor-resolve.c too
move tor_lookup_hostname from common/util to common/compat
svn:r3203
2004-12-22 05:29:06 +00:00
Nick Mathewson
c79c4200f4
Fix a bug in last patch; and keep my name out of the assert() call too.
...
svn:r3200
2004-12-22 02:46:28 +00:00
Nick Mathewson
32978afa54
Workaround for brain-damaged __FILE__ handling on MSVC: keep Nick's name out
...
of the warning messages.
svn:r3199
2004-12-22 02:32:26 +00:00
Nick Mathewson
bbc10c2ea1
Make split(..., NULL) split on horizontal space; fix bug with tabs in config file.
...
svn:r3155
2004-12-16 21:10:51 +00:00
Nick Mathewson
8c85c0bef8
Note that length checking on base64_decode is kinda conservative
...
svn:r3144
2004-12-13 18:38:19 +00:00
Nick Mathewson
fd4c624677
Belt *or* suspenders will be sufficient when casting things to unsigned char.
...
svn:r3122
2004-12-08 07:20:21 +00:00
Nick Mathewson
fe6eb34a10
Solaris CC freaks out if isspace and friends get anything other than an int. We learned that, so we casted. But it is also a bad idea to cast a signed char to an int and expect things to work on win32. Now we cast to unsigned char, then to int, then pass to isspace. Ug
...
svn:r3120
2004-12-08 00:42:50 +00:00
Roger Dingledine
bd5524bfc7
fix comment
...
svn:r3110
2004-12-07 15:37:35 +00:00
Nick Mathewson
a6aa5eebd6
Fix some memory leaks and unlikely segfaults
...
svn:r3103
2004-12-07 07:48:16 +00:00
Roger Dingledine
2297c57ba5
note an improvement on our uname we might want to make one day
...
svn:r3101
2004-12-07 07:35:32 +00:00
Nick Mathewson
0f49fd3bcd
Fix leakable rsa key
...
svn:r3099
2004-12-07 06:48:02 +00:00
Nick Mathewson
249a36586f
Fix parse_iso_time on platforms without strptime.
...
svn:r3091
2004-12-06 22:39:10 +00:00
Roger Dingledine
50a314c931
int is not necessarily the same size as size_t
...
svn:r3079
2004-12-05 11:58:30 +00:00
Roger Dingledine
32e74d3525
fix comment
...
svn:r3077
2004-12-04 13:58:34 +00:00
Nick Mathewson
a980446d0c
Be more proactive about noticing underflows: size_t values greater than 0x800...00 are likely to be trouble.
...
svn:r3064
2004-12-02 04:33:01 +00:00
Nick Mathewson
41ba4575b3
Fix windows build.
...
svn:r3053
2004-12-01 03:51:59 +00:00
Nick Mathewson
b457cfb5eb
Spell-check strings and comments
...
svn:r3052
2004-12-01 03:48:14 +00:00
Nick Mathewson
6e88abf418
If we are using select, make sure we stay within FD_SETSIZE.
...
svn:r3051
2004-12-01 03:15:59 +00:00
Roger Dingledine
7a8c1ca1e4
a few minor tweaks
...
svn:r3041
2004-11-30 08:54:08 +00:00
Nick Mathewson
f19e9b8577
doxygen uses backslashes, not forward-slashes
...
svn:r3033
2004-11-30 06:17:35 +00:00
Nick Mathewson
a3477223de
clarify why strlcpy is safe in truncated log messages
...
svn:r3032
2004-11-30 06:15:06 +00:00
Nick Mathewson
ad7db5e43a
Add casei versions of strcmpstart/strcmpend
...
svn:r3026
2004-11-30 03:10:56 +00:00