Commit Graph

21734 Commits

Author SHA1 Message Date
Nick Mathewson
4c094436c5 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-03 09:48:03 -04:00
Nick Mathewson
d38e474950 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-03 09:48:03 -04:00
Nick Mathewson
228d25ddf6 Merge branch 'maint-0.3.4' 2018-07-03 09:48:03 -04:00
rl1987
439b528f25 Rename sandbox_getaddrinfo() et. al. 2018-07-03 15:53:39 +03:00
rl1987
fedb3e46ec Remove ATTR_NONNULL macro 2018-07-03 12:33:09 +03:00
Nick Mathewson
dfdf32404c Partially revert "Use tor_addr_from_getsockname() in several places"
This reverts part of commit 6ed384b827, in order to
fix bug 26568.  Bugfix on 0.3.4.1-alpha.
2018-07-02 16:11:02 -04:00
Nick Mathewson
3baf3d01cb hs_ntor_ref.py: pass only strings to subprocess.Popen
Recent Python3 versions seem to require this on Windows.

Fixes bug 26535; bug copied from ntor_ref.py on 0.3.1.1-alpha.
2018-07-02 14:23:26 -04:00
Nick Mathewson
fc5f8b6931 ntor_ref.py: pass only strings to subprocess.Popen
Recent Python3 versions seem to require this on Windows.

Fixes bug 26535; bug introduced in f4be34f70d, which
was apparently intended itself as a Python3 workaround.
2018-07-02 14:18:41 -04:00
Nick Mathewson
bfcfeaed07 Merge branch 'mikeperry_bug26214-rebased_squashed' into maint-0.3.4 2018-07-02 13:22:07 -04:00
Nick Mathewson
c8ccd028a7 Don't redefine str(n)casecmp on windows unless they're missing
When we do redefine them, use inline functions instead of #define.

This fixes a latent code problem in our redefinition of these
functions, which was exposed by our refactoring: Previously, we
would #define strcasecmp after string.h was included, so nothing bad
would happen.  But when we refactored, we would sometimes #define it
first, which was a problem on mingw, whose headers contain
(approximately):

inline int strcasecmp (const char *a, const char *b)
   { return _stricmp(a,b); }

Our define turned this into:
  inline int _stricmp(const char *a, const char *b)
    { return _stricmp(a,b); }

And GCC would correctly infer that this function would loop forever,
rather than actually comparing anything.  This caused bug 26594.

Fixes bug 26594; bug not in any released version of Tor.
2018-07-02 11:50:17 -04:00
Nick Mathewson
cb1a3674eb File-level documentation for some of src/lib. 2018-07-01 20:22:55 -04:00
Nick Mathewson
83a4946e7b Prune the .may_include files a bit; detect unused lines in them 2018-07-01 18:14:28 -04:00
Nick Mathewson
518ebe14dc fixup! Extract or_options_t from or.h 2018-07-01 16:02:33 -04:00
Nick Mathewson
8d562c040f fixup! Remove system headers from or.h 2018-07-01 15:31:18 -04:00
Nick Mathewson
6c440da926 Remove system headers from or.h 2018-07-01 15:20:37 -04:00
Nick Mathewson
13116378b1 Extract or_options_t from or.h
I decided to have this file included from config.h, though, since it
is used nearly everywhere.
2018-07-01 15:20:37 -04:00
Nick Mathewson
986d761510 Extract or_state_t to its own header.
Fewer modules needed this than I had expected.
2018-07-01 15:20:37 -04:00
Nick Mathewson
f75357ec35 Pull a couple more enums from or.h 2018-07-01 15:20:37 -04:00
Nick Mathewson
6ccd98f93e Move ext_or_cmd_t to proto_ext_or 2018-07-01 15:20:37 -04:00
Nick Mathewson
49f88e77e5 Extract more constants from or.h 2018-07-01 15:20:37 -04:00
Nick Mathewson
f54a5cbfb6 Extract addr_policy_t into a new header. 2018-07-01 15:20:37 -04:00
Nick Mathewson
6da0311d2c Extract various enums and tiny structs from or.h
These all have a logical header to go in.
2018-07-01 15:20:37 -04:00
Nick Mathewson
1743dac078 Minimize headers that include crypto_formats and x25519 stuff 2018-07-01 15:20:37 -04:00
Nick Mathewson
500826479a Remove other needless includes include from or/*.h 2018-07-01 15:20:37 -04:00
Nick Mathewson
471104eaa5 Remove needless includes from or.h
or.h should really include only the minimum of stuff from or/*,
common/*, and lib/*.
2018-07-01 15:20:37 -04:00
Nick Mathewson
7a61a92870 Combine DH_BYTES and DH_KEY_LEN; put them in a lib/defs header. 2018-07-01 11:25:29 -04:00
Nick Mathewson
cf8c3abff1 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-01 10:22:21 -04:00
Nick Mathewson
adcd1d8b9a Merge branch 'maint-0.3.4' 2018-07-01 10:22:21 -04:00
Nick Mathewson
9aeef05f8f Merge remote-tracking branch 'dgoulet/bug26523_033_01' into maint-0.3.3 2018-07-01 10:22:18 -04:00
Nick Mathewson
43dc92441d Tabify all of the .am files. 2018-07-01 09:37:28 -04:00
Nick Mathewson
028523c801 Merge branch 'maint-0.3.4' 2018-06-30 09:15:39 -04:00
Nick Mathewson
e042727cf0 Merge remote-tracking branch 'catalyst-github/bug25895_034-squashed' into maint-0.3.4 2018-06-30 09:15:34 -04:00
Nick Mathewson
57155d38a3 Merge branch 'maint-0.3.4' 2018-06-29 23:12:03 -04:00
Nick Mathewson
8093a63f95 Restor EOL@EOF in routerlist.c 2018-06-29 23:08:45 -04:00
Nick Mathewson
ce940c8c09 Add another winsock2 include, for timeval in procmon. 2018-06-29 19:17:24 -04:00
Nick Mathewson
5921b23e15 add an include to fix macos, and probably bsd too 2018-06-29 14:03:13 -04:00
Nick Mathewson
ed84dab8b4 Merge branch 'maint-0.3.1' into maint-0.3.2 2018-06-29 13:49:43 -04:00
Nick Mathewson
36c372581f Merge branch 'maint-0.3.2' into maint-0.3.3 2018-06-29 13:49:43 -04:00
Nick Mathewson
75a6e7e256 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-06-29 13:49:43 -04:00
Nick Mathewson
cd3f957219 Merge branch 'maint-0.3.4' 2018-06-29 13:49:43 -04:00
Nick Mathewson
a3ec89a4f8 Merge branch 'maint-0.2.9' into maint-0.3.1 2018-06-29 13:49:43 -04:00
Nick Mathewson
3c0a63c40f Fix a memory error in test_shared_random
Bug not in any released Tor.
2018-06-29 13:49:02 -04:00
Nick Mathewson
d583459d58 Fix some memory errors in the recent coverity fixes.
Found by asan on travis :/
2018-06-29 13:48:36 -04:00
Nick Mathewson
92b4996b23 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-06-29 13:07:13 -04:00
Nick Mathewson
d3ecb3a8d6 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-06-29 13:07:13 -04:00
Nick Mathewson
1f389dadd0 Merge branch 'maint-0.3.4' 2018-06-29 13:07:13 -04:00
Nick Mathewson
6e9d5fc4ec Merge remote-tracking branch 'ahf-github/maint-0.3.2' into maint-0.3.2 2018-06-29 13:07:07 -04:00
Nick Mathewson
7a47379f25 Merge branch 'maint-0.3.4' 2018-06-29 13:06:16 -04:00
Nick Mathewson
f82f8179e6 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-06-29 13:06:15 -04:00
Nick Mathewson
f6b30a97a9 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-06-29 13:06:15 -04:00
Nick Mathewson
68dfbd5ef4 Merge branch 'maint-0.3.1' into maint-0.3.2 2018-06-29 13:06:15 -04:00
Nick Mathewson
b89a66e997 Merge remote-tracking branch 'ahf-github/maint-0.3.0' into maint-0.3.1 2018-06-29 13:06:11 -04:00
Nick Mathewson
419077c26d Merge remote-tracking branch 'ahf-github/maint-0.3.1' into maint-0.3.1 2018-06-29 13:06:08 -04:00
Nick Mathewson
1a5be3c5e7 Merge branch 'maint-0.3.4' 2018-06-29 13:03:00 -04:00
Nick Mathewson
5ab23e03fa Merge branch 'maint-0.3.3' into maint-0.3.4 2018-06-29 13:02:56 -04:00
Nick Mathewson
df896ed632 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-06-29 13:00:56 -04:00
Nick Mathewson
fe2588a5a8 Merge branch 'maint-0.3.1' into maint-0.3.2 2018-06-29 13:00:56 -04:00
Nick Mathewson
1385a5118d Merge branch 'maint-0.2.9' into maint-0.3.1 2018-06-29 13:00:56 -04:00
Nick Mathewson
9d5b815dca Add a missing include to timers, to make windows happier 2018-06-29 12:59:43 -04:00
Nick Mathewson
6ac64e16ed Eliminate compat.h 2018-06-29 12:21:52 -04:00
Nick Mathewson
077176a34c Stop using util.h and compat.h in src/trunnel/ 2018-06-29 12:21:52 -04:00
Nick Mathewson
666e3e5ec6 Stop using util.h and compat.h in src/tools 2018-06-29 12:21:52 -04:00
Nick Mathewson
4212a135e1 Remove util.h and compat.h includes from src/common 2018-06-29 12:21:52 -04:00
Nick Mathewson
35e1c497aa Combine compat.h into util.h
This is now just a collection of frequently-used headers.
2018-06-29 12:21:52 -04:00
Nick Mathewson
714788b195 Remove non-windows system includes from compat.h and util.h 2018-06-29 12:21:52 -04:00
Nick Mathewson
71e56c70e9 Remove windows libraries from util.h and compat.h 2018-06-29 12:21:52 -04:00
Nick Mathewson
31897a256c Extract socks5_status_t
I'm not sure of the best place to put this header long-term, since
both or/*.c and tools/tor-resolve.c use it.
2018-06-29 12:21:52 -04:00
Nick Mathewson
080069c7b3 Move SIO_IDEAL_SEND_BACKLOG_QUERY into socket.h 2018-06-29 12:21:52 -04:00
Nick Mathewson
b21108f839 Remove an errant (and unused) include permission in lib/tls 2018-06-29 12:21:52 -04:00
Nick Mathewson
e269044ce0 Remove compat.c and util.c 2018-06-29 12:21:52 -04:00
Nick Mathewson
4e11c2ca6c Extract getpass to a new lib/term library
(Term is short for terminal)
2018-06-29 12:21:52 -04:00
Nick Mathewson
e0957022bd Extract get_uname to lib/osinfo. 2018-06-29 12:21:52 -04:00
Nick Mathewson
207fc4cffe Move SUBTYPE_P into compat_compiler.h 2018-06-29 12:21:52 -04:00
Nick Mathewson
77bc65bbc4 Move bool_eq and bool_neq to lib/intmath 2018-06-29 12:21:52 -04:00
Nick Mathewson
40199b180e Remove read_all and write_all
These had become wrappers around their fd and socket variants; there
were only a few users of the original functions still remaining.
2018-06-29 12:21:52 -04:00
Nick Mathewson
0362cdc169 Move fd and memory-info functions. 2018-06-29 12:21:52 -04:00
Nick Mathewson
973afcc40b Move tor_get_avail_disk_space() to lib/fs 2018-06-29 09:43:00 -04:00
Nick Mathewson
f0319fcbde Merge remote-tracking branch 'catalyst-github/fix-macos-includes' 2018-06-28 18:19:53 -04:00
Taylor Yu
f9e22c68a0 Fix macOS includes
Recent code movement from refactoring missed some includes that seem
to be necessary on macOS.
2018-06-28 17:15:53 -05:00
Nick Mathewson
365179cd16 Fix a bogus n in a comment 2018-06-28 17:21:15 -04:00
Nick Mathewson
c84ab36eff A couple of includes to make windows compile again 2018-06-28 16:37:59 -04:00
Nick Mathewson
935ba02565 Fix paths for buffers.h; automated. 2018-06-28 16:29:35 -04:00
Nick Mathewson
d8b34e0886 Move buffers into container
Split the network-only and compression-only parts of buffers into
the appropriate modules.
2018-06-28 16:28:08 -04:00
Nick Mathewson
be40ad51b6 Add sys/capability.h and sys/prctl.h includes in setuid.c 2018-06-28 15:34:51 -04:00
Nick Mathewson
b67754cd64 compat_threads.c needs string.h for memset. 2018-06-28 15:20:26 -04:00
Nick Mathewson
a742a826f6 Remove all include common/ uses in crypto_ops and tls. 2018-06-28 14:40:25 -04:00
Nick Mathewson
0f02d2c041 Fix windows compilation in compat_time
We need to use lib/fs/winlib.h here so that we can use
GetTickCount64.

I would love to declare that XP is dead, and everybody has
GetTickCount64.
2018-06-28 13:40:21 -04:00
Nick Mathewson
7d7af19f1b Use tor_ntohs in compress.c; avoid a winsocks dependency 2018-06-28 13:39:49 -04:00
Nick Mathewson
326c473b79 fixup! Extract time functionality into lib/wallclock and lib/time 2018-06-28 13:39:09 -04:00
Nick Mathewson
02bb701bba Move DLL support to lib/fs 2018-06-28 13:37:51 -04:00
Nick Mathewson
8fc15e4861 Add ntohs and htons to lib/arch/bytes.h 2018-06-28 13:26:27 -04:00
Nick Mathewson
4dda026f0d Update lib/compress to not require common/*.h 2018-06-28 13:19:58 -04:00
Nick Mathewson
3d1e99d01b Move MIN and MAX into lib/intmath/cmp.h 2018-06-28 13:19:42 -04:00
Nick Mathewson
8736892679 Remove a pair of windows flags used nowhere in our code 2018-06-28 13:02:33 -04:00
Nick Mathewson
57f4b83852 Fix up the include path of compat_time.h (automated) 2018-06-28 13:01:54 -04:00
Nick Mathewson
a097ddb4f5 Extract time functionality into lib/wallclock and lib/time 2018-06-28 13:01:54 -04:00
Nick Mathewson
bdea94a665 Move floating-point math functions into a new lib/math 2018-06-28 12:24:45 -04:00
Nick Mathewson
6178a9f758 Move compute_num_cpus to lib/thread 2018-06-28 12:08:18 -04:00
Nick Mathewson
042df08693 Move network_init to lib/net 2018-06-28 11:59:16 -04:00
Nick Mathewson
db1a420c4e Move tor_gethostname to lib/net 2018-06-28 11:57:01 -04:00