[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Block the port-forwarding helper at a higher point



commit 801aa5d03b3a62c7ed09e8c36629ced23e8c663a
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Aug 9 10:48:43 2017 -0400

    Block the port-forwarding helper at a higher point
---
 src/or/config.c | 4 ++++
 src/or/main.c   | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/or/config.c b/src/or/config.c
index 16e4ded69..7499dab47 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3575,6 +3575,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
     REJECT("PortForwarding is not compatible with Sandbox; at most one can "
            "be set");
   }
+  if (options->PortForwarding && options->NoExec) {
+    COMPLAIN("Both PortForwarding and NoExec are set; PortForwarding will "
+             "be ignored.");
+  }
 
   if (ensure_bandwidth_cap(&options->BandwidthRate,
                            "BandwidthRate", msg) < 0)
diff --git a/src/or/main.c b/src/or/main.c
index 42d984acf..45c37159d 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -2036,7 +2036,8 @@ check_fw_helper_app_callback(time_t now, const or_options_t *options)
 {
   if (net_is_disabled() ||
       ! server_mode(options) ||
-      ! options->PortForwarding) {
+      ! options->PortForwarding ||
+      options->NoExec) {
     return PERIODIC_EVENT_NO_UPDATE;
   }
   /* 11. check the port forwarding app */



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits