| 
					
				 | 
			
			
				@@ -69,7 +69,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 extern int quiet_level; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /* Prefix used to indicate a Unix socket in a FooPort configuration. */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-static const char *unix_socket_prefix = "unix:"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static const char unix_socket_prefix[] = "unix:"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 /** A list of abbreviations and aliases to map command-line options, obsolete 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  * option names, or alternative option names, to their current values. */ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -203,7 +203,6 @@ static config_var_t option_vars_[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   V(ControlPortWriteToFile,      FILENAME, NULL), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   V(ControlSocket,               LINELIST, NULL), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   V(ControlSocketsGroupWritable, BOOL,     "0"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  V(SocksSocket,                 LINELIST, NULL), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   V(SocksSocketsGroupWritable,   BOOL,     "0"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   V(CookieAuthentication,        BOOL,     "0"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   V(CookieAuthFileGroupReadable, BOOL,     "0"), 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1053,20 +1052,6 @@ options_act_reversible(const or_options_t *old_options, char **msg) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-#ifndef HAVE_SYS_UN_H 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  if (options->SocksSocket || options->SocksSocketsGroupWritable) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    *msg = tor_strdup("Unix domain sockets (SocksSocket) not supported " 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                      "on this OS/with this build."); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    goto rollback; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-#else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  if (options->SocksSocketsGroupWritable && !options->SocksSocket) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    *msg = tor_strdup("Setting SocksSocketGroupWritable without setting" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                      "a SocksSocket makes no sense."); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    goto rollback; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if (running_tor) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     int n_ports=0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /* We need to set the connection limit before we can open the listeners. */ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -5656,6 +5641,14 @@ config_parse_unix_port(const char *addrport, char **path_out) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 int 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 config_parse_unix_port(const char *addrport, char **path_out) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  tor_assert(path_out); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  tor_assert(addrport); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if (strcmpstart(addrport, unix_socket_prefix)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /* Not a Unix socket path. */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return -ENOENT; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   log_warn(LD_CONFIG, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            "Port configuration %s is for an AF_UNIX socket, but we have no" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            "support available on this platform", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -6218,13 +6211,6 @@ parse_ports(or_options_t *options, int validate_only, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       *msg = tor_strdup("Invalid ControlSocket configuration"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       goto err; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (parse_port_config(ports, options->SocksSocket, NULL, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                          "SocksSocket", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                          CONN_TYPE_AP_LISTENER, NULL, 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                          CL_PORT_IS_UNIXSOCKET) < 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      *msg = tor_strdup("Invalid SocksSocket configuration"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      goto err; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   if (! options->ClientOnly) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (parse_port_config(ports, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -6268,8 +6254,6 @@ parse_ports(or_options_t *options, int validate_only, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     !! count_real_listeners(ports, CONN_TYPE_OR_LISTENER); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   options->SocksPort_set = 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     !! count_real_listeners(ports, CONN_TYPE_AP_LISTENER); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  options->SocksSocket_set = 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    !! count_real_listeners(ports, CONN_TYPE_AP_LISTENER); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   options->TransPort_set = 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     !! count_real_listeners(ports, CONN_TYPE_AP_TRANS_LISTENER); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   options->NATDPort_set = 
			 |