|
@@ -409,6 +409,7 @@ static config_var_t option_vars_[] = {
|
|
|
OBSOLETE("PredictedPortsRelevanceTime"),
|
|
|
OBSOLETE("WarnUnsafeSocks"),
|
|
|
VAR("NodeFamily", LINELIST, NodeFamilies, NULL),
|
|
|
+ V(NoExec, BOOL, "0"),
|
|
|
V(NumCPUs, UINT, "0"),
|
|
|
V(NumDirectoryGuards, UINT, "0"),
|
|
|
V(NumEntryGuards, UINT, "0"),
|
|
@@ -1595,6 +1596,10 @@ options_act(const or_options_t *old_options)
|
|
|
const int transition_affects_guards =
|
|
|
old_options && options_transition_affects_guards(old_options, options);
|
|
|
|
|
|
+ if (options->NoExec) {
|
|
|
+ tor_disable_spawning_background_processes();
|
|
|
+ }
|
|
|
+
|
|
|
/* disable ptrace and later, other basic debugging techniques */
|
|
|
{
|
|
|
/* Remember if we already disabled debugger attachment */
|
|
@@ -4447,6 +4452,12 @@ options_transition_allowed(const or_options_t *old,
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
+ if (old->NoExec && !new_val->NoExec) {
|
|
|
+ *msg = tor_strdup("While Tor is running, disabling "
|
|
|
+ "NoExec is not allowed.");
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+
|
|
|
if (sandbox_is_active()) {
|
|
|
#define SB_NOCHANGE_STR(opt) \
|
|
|
do { \
|