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
David Goulet
Tor
Commits
6bb31cba
Commit
6bb31cba
authored
Jan 06, 2015
by
Nick Mathewson
👁
Browse files
New option "--disable-system-torrc" to not read torrc from etc
Implements 13037.
parent
14dedff0
Changes
3
Hide whitespace changes
Inline
Side-by-side
changes/ticket13037
0 → 100644
View file @
6bb31cba
o Minor features (build):
- New --disable-system-torrc compile-time option to prevent Tor from
looking for a system-wide torrc or torrc-defaults tile. Resolves
ticket 13037.
configure.ac
View file @
6bb31cba
...
...
@@ -45,6 +45,8 @@ AC_ARG_ENABLE(unittests,
AS_HELP_STRING(--disable-unittests, [Don't build unit tests for Tor. Risky!]))
AC_ARG_ENABLE(coverage,
AS_HELP_STRING(--enable-coverage, [Enable coverage support in the unit-test build]))
AC_ARG_ENABLE(system-torrc,
AS_HELP_STRING(--disable-system-torrc, [Don't look for a system-wide torrc file]))
AM_CONDITIONAL(UNITTESTS_ENABLED, test x$enable_unittests != xno)
AM_CONDITIONAL(COVERAGE_ENABLED, test x$enable_coverage = xyes)
...
...
@@ -56,6 +58,11 @@ if test "$enable_static_tor" = "yes"; then
CFLAGS="$CFLAGS -static"
fi
if test "$enable_system_torrc" = "no"; then
AC_DEFINE(DISABLE_SYSTEM_TORRC, 1,
[Defined if we're not going to look for a torrc in SYSCONF])
fi
if test x$enable_buf_freelists = xyes; then
AC_DEFINE(ENABLE_BUF_FREELISTS, 1,
[Defined if we try to use freelists for buffer RAM chunks])
...
...
src/or/config.c
View file @
6bb31cba
...
...
@@ -4013,7 +4013,10 @@ get_windows_conf_root(void)
static
const
char
*
get_default_conf_file
(
int
defaults_file
)
{
#ifdef _WIN32
#ifdef DISABLE_SYSTEM_TORRC
(
void
)
defaults_file
;
return
NULL
;
#elif defined(_WIN32)
if
(
defaults_file
)
{
static
char
defaults_path
[
MAX_PATH
+
1
];
tor_snprintf
(
defaults_path
,
MAX_PATH
,
"%s
\\
torrc-defaults"
,
...
...
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