Alexander Færøy
771930b84c
Refactor buf_read_from_socket() into buf_read_from_fd().
...
This patch refactors buf_read_from_socket() into buf_read_from_fd(), and
creates a specialized function for buf_read_from_socket(), which uses
buf_read_from_fd().
See: https://bugs.torproject.org/28179
2018-11-27 19:31:08 +01:00
Alexander Færøy
c71f9df07b
Refactor buf_flush_to_socket() into buf_flush_to_fd().
...
This patch refactors buf_flush_to_socket() into buf_flush_to_fd() and
creates a specialization function for buf_flush_to_socket() that makes
use of buf_flush_to_fd().
See: https://bugs.torproject.org/28179
2018-11-27 19:31:08 +01:00
Alexander Færøy
340260281a
Refactor flush_chunk() to work on pipes as well as sockets.
...
See: https://bugs.torproject.org/28179
2018-11-27 19:31:08 +01:00
Alexander Færøy
5f26ae833e
Refactor read_to_chunk() such that it supports both pipes and sockets.
...
See: https://bugs.torproject.org/28179
2018-11-27 19:31:08 +01:00
Nick Mathewson
8a15d0f69b
Merge branch 'maint-0.3.5'
2018-11-26 17:25:28 -05:00
teor
44ced9b750
Merge branch 'bug28096-029-squashed' into bug28096-035-squashed
...
Move the get_uname() changes from src/common/compat.c to
src/lib/osinfo/uname.c
2018-11-15 12:23:29 +10:00
Nick Mathewson
eaff47352a
Make sure sandbox-related getaddrinfo() functions always exist.
2018-11-14 16:12:29 -05:00
Nick Mathewson
e429e31ad1
Normalize .may_include to always have paths, and paths to include
2018-11-14 16:07:35 -05:00
Nick Mathewson
c0a7527eb8
Remove dependency on lib/net from lib/sandbox.
...
This was trivial, and the easiest way to remove the remaining
.may_include circularities.
2018-11-14 16:07:03 -05:00
Nick Mathewson
f6b8c7da66
Move buffers.c out of lib/containers to resolve a circularity.
2018-11-14 16:07:03 -05:00
Nick Mathewson
c9f9c9bc49
Make memarea use smartlist_core, not container.
2018-11-14 16:07:03 -05:00
Nick Mathewson
a6a7a1f3ed
Merge branch 'maint-0.3.5'
2018-11-13 16:48:26 -05:00
Nick Mathewson
021187f915
Merge branch 'bug28183_029' into maint-0.3.5
2018-11-13 16:48:21 -05:00
Nick Mathewson
d000e798ac
Merge branch 'maint-0.3.5'
2018-11-13 08:27:29 -05:00
Nick Mathewson
ae4c94bb64
Merge branch 'maint-0.3.4' into maint-0.3.5
2018-11-13 08:27:29 -05:00
Nick Mathewson
d1e9285b1d
Merge branch 'maint-0.3.5'
2018-11-11 18:05:45 -05:00
Nick Mathewson
896d0ebb99
Merge branch 'maint-0.3.4' into maint-0.3.5
2018-11-11 18:05:45 -05:00
Nick Mathewson
bf4f55a13d
Merge branch 'subsystems'
2018-11-09 15:01:49 -05:00
Nick Mathewson
c6336727ca
Rename subsystem callback functions to make them consistent
2018-11-09 11:12:12 -05:00
Nick Mathewson
e80595f562
fixup! Make initialization for the "err" library into a subsystem.
...
Check for failure to install backtrace handler.
2018-11-09 11:00:31 -05:00
Nick Mathewson
61695e3d62
Document that subsystem callbacks are optional.
2018-11-09 10:58:20 -05:00
Nick Mathewson
4fe4bcf8a1
Explain that configuration should happen elsewhere, but not init.
2018-11-09 10:55:18 -05:00
Nick Mathewson
5d73f87ced
Merge branch 'maint-0.3.5'
2018-11-09 10:49:48 -05:00
Nick Mathewson
2ac2d0a426
Merge branch 'maint-0.3.4' into maint-0.3.5
2018-11-09 10:49:47 -05:00
Roger Dingledine
6e828ced56
simplify now that it uses tor's copyright and license
2018-11-07 11:02:26 -05:00
Nick Mathewson
a7a060a637
Switch ctassert.h to 3bsd (with permission)
2018-11-07 10:37:02 -05:00
Nick Mathewson
770653ff45
Allow lib/cc to include its own files.
2018-11-06 16:59:39 -05:00
Nick Mathewson
d9508d8ede
Change copyright statement (with permission)
2018-11-06 15:42:18 -05:00
Nick Mathewson
6b706bcf19
Remove a tab.
2018-11-06 15:41:32 -05:00
Nick Mathewson
3c9dd9ef2d
Add parentheses to the ctassert macro expansions
2018-11-06 15:41:14 -05:00
Nick Mathewson
e69a4ad6b3
Add a user of CTASSERT().
2018-11-06 15:39:58 -05:00
Taylor R Campbell
1a6060fa42
New macro CTASSERT(condition) to assert condition at compile-time.
...
To get it, use: #include "lib/cc/ctassert.h"
2018-11-06 15:36:58 -05:00
Nick Mathewson
8020d6fb05
Merge remote-tracking branch 'tor-github/pr/464'
2018-11-06 15:33:25 -05:00
Nick Mathewson
bcba6a4918
Merge branch 'maint-0.3.5'
2018-11-06 15:17:52 -05:00
Kris Katterjohn
daaa2751ed
Include sys/time.h in timers.c and time_fmt.c
...
This fixes compilation on OpenBSD.
Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2018-11-06 15:15:22 -05:00
Nick Mathewson
32b23a4c40
Make tortls use the subsystems interface
...
This one only needs a shutdown right now.
2018-11-05 09:22:02 -05:00
Nick Mathewson
019a044e5e
Turn "compress" into a subsystem.
2018-11-05 09:22:02 -05:00
Nick Mathewson
207253df8d
Move monotonic time setup into a subsystem
2018-11-05 09:22:02 -05:00
Nick Mathewson
cad61f0f6d
Move prefork, postfork, and thread-exit hooks into subsys
...
So far, crypto is the only module that uses them, but others are
likely to do so in the future.
2018-11-05 09:22:02 -05:00
Nick Mathewson
50436ccea4
Add crypto module as a subsystem.
2018-11-05 09:22:02 -05:00
Nick Mathewson
cfe5b35edb
Move networking startup/cleanup logic into a subsystem.
2018-11-05 09:22:02 -05:00
Nick Mathewson
05b54f6a6a
Use subsystems manager for subsystems used in tests.
2018-11-05 09:22:02 -05:00
Nick Mathewson
a0ee54549f
Turn the wallclock module into a subsystem.
...
(This may be slightly gratuitous.)
2018-11-05 09:22:02 -05:00
Nick Mathewson
d3e4afcc9b
Turn the logging code into a subsystem
2018-11-05 09:22:02 -05:00
Nick Mathewson
b8c50eabfe
Add a subsystem for our threading support
2018-11-05 09:22:02 -05:00
Nick Mathewson
178c1821b2
Make the windows process parameter initialization a subsystem
...
Also, move it from "main" into lib/process
2018-11-05 09:22:02 -05:00
Nick Mathewson
175153a329
Make initialization for the "err" library into a subsystem.
2018-11-05 09:22:02 -05:00
Nick Mathewson
6e7ff8cba0
Move the code that knows our tor version into a lowest-level lib
2018-11-05 09:22:02 -05:00
Nick Mathewson
7bb76b24cf
Code to manage the list of subsystems.
2018-11-05 09:22:02 -05:00
Nick Mathewson
a6c7e01584
Merge branch 'bug27963_wallclock' into maint-0.3.5
2018-11-02 09:39:13 -04:00