Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Core
Tor
Commits
049705fc
Commit
049705fc
authored
Sep 11, 2019
by
David Goulet
🔆
Browse files
Merge branch 'tor-github/pr/1311'
parents
3b32f250
39c7f46d
Changes
9
Hide whitespace changes
Inline
Side-by-side
changes/bug31615
0 → 100644
View file @
049705fc
o Minor bugfixes (subsystems):
- Make the subsystem init order match the subsystem module dependencies.
Call windows process security APIs as early as possible. Init log before
network and time, so that network and time can use logging.
Fixes bug 31615; bugfix on 0.4.0.1-alpha.
src/app/main/subsystem_list.c
View file @
049705fc
...
...
@@ -33,33 +33,38 @@
/**
* Global list of the subsystems in Tor, in the order of their initialization.
* Want to know the exact level numbers?
* We'll implement a level dump command in #31614.
**/
const
subsys_fns_t
*
tor_subsystems
[]
=
{
&
sys_winprocess
,
/* -100 */
&
sys_torerr
,
/* -100 */
&
sys_wallclock
,
/* -99 */
&
sys_threads
,
/* -95 */
&
sys_logging
,
/* -90 */
&
sys_time
,
/* -90 */
&
sys_network
,
/* -90 */
&
sys_compress
,
/* -70 */
&
sys_crypto
,
/* -60 */
&
sys_tortls
,
/* -50 */
&
sys_process
,
/* -35 */
&
sys_winprocess
,
&
sys_torerr
,
&
sys_
orconn_event
,
/* -33 */
&
sys_
ocirc_event
,
/* -32 */
&
sys_
btrack
,
/* -30 */
&
sys_
wallclock
,
&
sys_
threads
,
&
sys_
logging
,
&
sys_evloop
,
/* -20 */
&
sys_time
,
&
sys_network
,
&
sys_mainloop
,
/* 5 */
&
sys_or
,
/* 20 */
&
sys_compress
,
&
sys_crypto
,
&
sys_tortls
,
&
sys_process
,
&
sys_relay
,
/* 50 */
&
sys_orconn_event
,
&
sys_ocirc_event
,
&
sys_btrack
,
&
sys_evloop
,
&
sys_mainloop
,
&
sys_or
,
&
sys_relay
,
#ifdef HAVE_MODULE_DIRAUTH
&
sys_dirauth
,
/* 70 */
&
sys_dirauth
,
#endif
};
...
...
src/lib/err/torerr_sys.c
View file @
049705fc
...
...
@@ -33,7 +33,10 @@ subsys_torerr_shutdown(void)
const
subsys_fns_t
sys_torerr
=
{
.
name
=
"err"
,
.
level
=
-
100
,
/* Low-level error handling is a diagnostic feature, we want it to init
* right after windows process security, and shutdown last.
* (Security never shuts down.) */
.
level
=
-
99
,
.
supported
=
true
,
.
initialize
=
subsys_torerr_initialize
,
.
shutdown
=
subsys_torerr_shutdown
...
...
src/lib/log/log_sys.c
View file @
049705fc
...
...
@@ -29,6 +29,8 @@ subsys_logging_shutdown(void)
const
subsys_fns_t
sys_logging
=
{
.
name
=
"log"
,
.
supported
=
true
,
/* Logging depends on threads, approx time, raw logging, and security.
* Most other lib modules depend on logging. */
.
level
=
-
90
,
.
initialize
=
subsys_logging_initialize
,
.
shutdown
=
subsys_logging_shutdown
,
...
...
src/lib/net/network_sys.c
View file @
049705fc
...
...
@@ -37,7 +37,9 @@ subsys_network_shutdown(void)
const
subsys_fns_t
sys_network
=
{
.
name
=
"network"
,
.
level
=
-
90
,
/* Network depends on logging, and a lot of other modules depend on network.
*/
.
level
=
-
80
,
.
supported
=
true
,
.
initialize
=
subsys_network_initialize
,
.
shutdown
=
subsys_network_shutdown
,
...
...
src/lib/process/winprocess_sys.c
View file @
049705fc
...
...
@@ -58,6 +58,8 @@ subsys_winprocess_initialize(void)
const
subsys_fns_t
sys_winprocess
=
{
.
name
=
"winprocess"
,
/* HeapEnableTerminationOnCorruption and setdeppolicy() are security
* features, we want them to run first. */
.
level
=
-
100
,
.
supported
=
WINPROCESS_SYS_ENABLED
,
.
initialize
=
subsys_winprocess_initialize
,
...
...
src/lib/thread/compat_threads.c
View file @
049705fc
...
...
@@ -122,6 +122,8 @@ subsys_threads_initialize(void)
const
subsys_fns_t
sys_threads
=
{
.
name
=
"threads"
,
.
supported
=
true
,
/* Threads is used by logging, which is a diagnostic feature, we want it to
* init right after low-level error handling and approx time. */
.
level
=
-
95
,
.
initialize
=
subsys_threads_initialize
,
};
src/lib/time/time_sys.c
View file @
049705fc
...
...
@@ -20,7 +20,9 @@ subsys_time_initialize(void)
const
subsys_fns_t
sys_time
=
{
.
name
=
"time"
,
.
level
=
-
90
,
/* Monotonic time depends on logging, and a lot of other modules depend on
* monotonic time. */
.
level
=
-
80
,
.
supported
=
true
,
.
initialize
=
subsys_time_initialize
,
};
src/lib/wallclock/approx_time.c
View file @
049705fc
...
...
@@ -54,6 +54,8 @@ subsys_wallclock_initialize(void)
const
subsys_fns_t
sys_wallclock
=
{
.
name
=
"wallclock"
,
.
supported
=
true
,
.
level
=
-
99
,
/* Approximate time is a diagnostic feature, we want it to init right after
* low-level error handling. */
.
level
=
-
98
,
.
initialize
=
subsys_wallclock_initialize
,
};
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment