]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Never disable debugger attachment for the unit tests
authorSebastian Hahn <sebastian@torproject.org>
Thu, 22 Mar 2012 11:50:44 +0000 (12:50 +0100)
committerSebastian Hahn <sebastian@torproject.org>
Thu, 22 Mar 2012 11:50:44 +0000 (12:50 +0100)
changes/bug5448 [new file with mode: 0644]
src/or/config.c

diff --git a/changes/bug5448 b/changes/bug5448
new file mode 100644 (file)
index 0000000..aaf7dc7
--- /dev/null
@@ -0,0 +1,5 @@
+  o Major bugfixes:
+    - Allow running the unit tests in gdb again. This was accidentally made
+      impossible when the DisableDebuggerAttachment option was introduced.
+      Fixes bug 5448; bugfix on 0.2.3.9-alpha.
+
index 0c699b021d256543b7881e77e46494d80f3fb626..3de8426460190f10ef8f14e6d89c9966f073d2e0 100644 (file)
@@ -1338,7 +1338,9 @@ options_act(const or_options_t *old_options)
     /* Remember if we already warned about being configured not to disable
      * debugger attachment */
     static int warned_debugger_attach = 0;
-    if (options->DisableDebuggerAttachment && !disabled_debugger_attach) {
+    /* Don't disable debugger attachment when we're running the unit tests. */
+    if (options->DisableDebuggerAttachment && !disabled_debugger_attach &&
+        running_tor) {
       int ok = tor_disable_debugger_attach();
       if (warned_debugger_attach && ok == 1) {
         log_notice(LD_CONFIG, "Disabled attaching debuggers for unprivileged "