diff options
author | Matt Johnston <matt@ucc.asn.au> | 2006-03-21 16:20:59 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2006-03-21 16:20:59 +0000 |
commit | f7caf6f5c640cb1756c01184898f176438a3a0c2 (patch) | |
tree | 4d32de11b18d5f6296207961b5f25d0949af80c0 /svr-runopts.c | |
parent | e444f0cfe67c71d3f38854f27cefae9aea6c4cd9 (diff) | |
parent | 3f49fc5f2ca0ec4adb5cac081f502cbb86702efa (diff) |
propagate from branch 'au.asn.ucc.matt.dropbear' (head 0501e6f661b5415eb76f3b312d183c3adfbfb712)
to branch 'au.asn.ucc.matt.dropbear.cli-agent' (head 01038174ec27245b51bd43a66c01ad930880f67b)
--HG--
branch : agent-client
extra : convert_revision : 12b2f59db65e7339d340e95ac67d6d9ddb193c2b
Diffstat (limited to 'svr-runopts.c')
-rw-r--r-- | svr-runopts.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/svr-runopts.c b/svr-runopts.c index 375797b..8d8b8df 100644 --- a/svr-runopts.c +++ b/svr-runopts.c @@ -63,13 +63,14 @@ static void printhelp(const char * progname) { "-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 @@ void svr_getopts(int argc, char ** argv) { 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 @@ void svr_getopts(int argc, char ** argv) { #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 @@ void svr_getopts(int argc, char ** argv) { 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 |