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

[tor-commits] [tor/master] Check whether a client port is a Unix socket before using its IP addr



commit 9df99bbb9171c15b00c5148f54397351eccac95b
Author: Robert Ransom <rransom.8774@xxxxxxxxx>
Date:   Thu Oct 20 03:17:23 2011 -0700

    Check whether a client port is a Unix socket before using its IP addr
    
    Bugfix on commit c1ac0695d5bc64b555c345e4be87b18bab3ae56b, not yet in any
    release.  Fixes bug 4091; bug reported by SwissTorHelp.
---
 src/or/config.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/or/config.c b/src/or/config.c
index 388c45f..59bbe1d 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -5128,7 +5128,9 @@ static void
 warn_nonlocal_client_ports(const smartlist_t *ports, const char *portname)
 {
   SMARTLIST_FOREACH_BEGIN(ports, const port_cfg_t *, port) {
-    if (!tor_addr_is_internal(&port->addr, 1)) {
+    if (port->is_unix_addr) {
+      /* Unix sockets aren't accessible over a network. */
+    } else if (!tor_addr_is_internal(&port->addr, 1)) {
       log_warn(LD_CONFIG, "You specified a public address for %sPort. "
                "Other people on the Internet might find your computer and "
                "use it as an open proxy. Please don't allow this unless you "



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