diff svr-runopts.c @ 293:9d110777f345 contrib-blacklist

propagate from branch 'au.asn.ucc.matt.dropbear' (head 7ad1775ed65e75dbece27fe6b65bf1a234db386a) to branch 'au.asn.ucc.matt.dropbear.contrib.blacklist' (head 1d86a4f0a401cc68c2670d821a2f6366c37af143)
author Matt Johnston <matt@ucc.asn.au>
date Fri, 10 Mar 2006 06:31:29 +0000
parents be18c7dd486e
children 973fccb59ea4 3bfbe95f9a14 0aaaf68e97dc
line wrap: on
line diff
--- a/svr-runopts.c	Tue Sep 06 04:57:14 2005 +0000
+++ b/svr-runopts.c	Fri Mar 10 06:31:29 2006 +0000
@@ -63,13 +63,14 @@
 					"-s		Disable password logins\n"
 					"-g		Disable password logins for root\n"
 #endif
-#ifndef DISABLE_LOCALTCPFWD
+#ifdef ENABLE_SVR_LOCALTCPFWD
 					"-j		Disable local port forwarding\n"
 #endif
-#ifndef DISABLE_REMOTETCPFWD
+#ifdef ENABLE_SVR_REMOTETCPFWD
 					"-k		Disable remote port forwarding\n"
+					"-a		Allow connections to forwarded ports from any host\n"
 #endif
-					"-p port	Listen on specified tcp port, up to %d can be specified\n"
+					"-p port		Listen on specified tcp port, up to %d can be specified\n"
 					"		(default %s if none specified)\n"
 #ifdef INETD_MODE
 					"-i		Start for inetd\n"
@@ -104,8 +105,12 @@
 	svr_opts.inetdmode = 0;
 	svr_opts.portcount = 0;
 	svr_opts.hostkey = NULL;
-	opts.nolocaltcp = 0;
-	opts.noremotetcp = 0;
+#ifdef ENABLE_SVR_LOCALTCPFWD
+	svr_opts.nolocaltcp = 0;
+#endif
+#ifdef ENABLE_SVR_REMOTETCPFWD
+	svr_opts.noremotetcp = 0;
+#endif
 	/* not yet
 	opts.ipv4 = 1;
 	opts.ipv6 = 1;
@@ -116,6 +121,9 @@
 #ifndef DISABLE_SYSLOG
 	svr_opts.usingsyslog = 1;
 #endif
+#ifdef ENABLE_SVR_REMOTETCPFWD
+	opts.listen_fwd_all = 0;
+#endif
 
 	for (i = 1; i < (unsigned int)argc; i++) {
 		if (next) {
@@ -150,14 +158,17 @@
 					svr_opts.usingsyslog = 0;
 					break;
 #endif
-#ifndef DISABLE_LOCALTCPFWD
+#ifdef ENABLE_SVR_LOCALTCPFWD
 				case 'j':
-					opts.nolocaltcp = 1;
+					svr_opts.nolocaltcp = 1;
 					break;
 #endif
-#ifndef DISABLE_REMOTETCPFWD
+#ifdef ENABLE_SVR_REMOTETCPFWD
 				case 'k':
-					opts.noremotetcp = 1;
+					svr_opts.noremotetcp = 1;
+					break;
+				case 'a':
+					opts.listen_fwd_all = 1;
 					break;
 #endif
 #ifdef INETD_MODE