Mercurial > dropbear
comparison svr-runopts.c @ 258:306499676384
* add -g (dbclient) and -a (dropbear) options for allowing non-local
hosts to connect to forwarded ports. Rearranged various some of the
tcp listening code.
* changed to /* */ style brackets in svr-authpam.c
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 04 Dec 2005 16:13:11 +0000 |
parents | 0cfba3034be5 |
children | be18c7dd486e 740e782679be |
comparison
equal
deleted
inserted
replaced
257:63601217f5ab | 258:306499676384 |
---|---|
61 "-w Disallow root logins\n" | 61 "-w Disallow root logins\n" |
62 #if defined(ENABLE_SVR_PASSWORD_AUTH) || defined(ENABLE_SVR_PAM_AUTH) | 62 #if defined(ENABLE_SVR_PASSWORD_AUTH) || defined(ENABLE_SVR_PAM_AUTH) |
63 "-s Disable password logins\n" | 63 "-s Disable password logins\n" |
64 "-g Disable password logins for root\n" | 64 "-g Disable password logins for root\n" |
65 #endif | 65 #endif |
66 #ifndef DISABLE_LOCALTCPFWD | 66 #ifdef ENABLE_SVR_LOCALTCPFWD |
67 "-j Disable local port forwarding\n" | 67 "-j Disable local port forwarding\n" |
68 #endif | 68 #endif |
69 #ifndef DISABLE_REMOTETCPFWD | 69 #ifdef ENABLE_SVR_REMOTETCPFWD |
70 "-k Disable remote port forwarding\n" | 70 "-k Disable remote port forwarding\n" |
71 #endif | 71 "-a Allow connections to forwarded ports from any host\n" |
72 "-p port Listen on specified tcp port, up to %d can be specified\n" | 72 #endif |
73 "-p port Listen on specified tcp port, up to %d can be specified\n" | |
73 " (default %s if none specified)\n" | 74 " (default %s if none specified)\n" |
74 #ifdef INETD_MODE | 75 #ifdef INETD_MODE |
75 "-i Start for inetd\n" | 76 "-i Start for inetd\n" |
76 #endif | 77 #endif |
77 #ifdef DEBUG_TRACE | 78 #ifdef DEBUG_TRACE |
102 svr_opts.noauthpass = 0; | 103 svr_opts.noauthpass = 0; |
103 svr_opts.norootpass = 0; | 104 svr_opts.norootpass = 0; |
104 svr_opts.inetdmode = 0; | 105 svr_opts.inetdmode = 0; |
105 svr_opts.portcount = 0; | 106 svr_opts.portcount = 0; |
106 svr_opts.hostkey = NULL; | 107 svr_opts.hostkey = NULL; |
107 opts.nolocaltcp = 0; | 108 svr_opts.nolocaltcp = 0; |
108 opts.noremotetcp = 0; | 109 svr_opts.noremotetcp = 0; |
109 /* not yet | 110 /* not yet |
110 opts.ipv4 = 1; | 111 opts.ipv4 = 1; |
111 opts.ipv6 = 1; | 112 opts.ipv6 = 1; |
112 */ | 113 */ |
113 #ifdef DO_MOTD | 114 #ifdef DO_MOTD |
114 svr_opts.domotd = 1; | 115 svr_opts.domotd = 1; |
115 #endif | 116 #endif |
116 #ifndef DISABLE_SYSLOG | 117 #ifndef DISABLE_SYSLOG |
117 svr_opts.usingsyslog = 1; | 118 svr_opts.usingsyslog = 1; |
119 #endif | |
120 #ifdef ENABLE_SVR_REMOTETCPFWD | |
121 opts.listen_fwd_all = 0; | |
118 #endif | 122 #endif |
119 | 123 |
120 for (i = 1; i < (unsigned int)argc; i++) { | 124 for (i = 1; i < (unsigned int)argc; i++) { |
121 if (next) { | 125 if (next) { |
122 *next = argv[i]; | 126 *next = argv[i]; |
150 svr_opts.usingsyslog = 0; | 154 svr_opts.usingsyslog = 0; |
151 break; | 155 break; |
152 #endif | 156 #endif |
153 #ifndef DISABLE_LOCALTCPFWD | 157 #ifndef DISABLE_LOCALTCPFWD |
154 case 'j': | 158 case 'j': |
155 opts.nolocaltcp = 1; | 159 svr_opts.nolocaltcp = 1; |
156 break; | 160 break; |
157 #endif | 161 #endif |
158 #ifndef DISABLE_REMOTETCPFWD | 162 #ifndef DISABLE_REMOTETCPFWD |
159 case 'k': | 163 case 'k': |
160 opts.noremotetcp = 1; | 164 svr_opts.noremotetcp = 1; |
165 break; | |
166 case 'a': | |
167 opts.listen_fwd_all = 1; | |
161 break; | 168 break; |
162 #endif | 169 #endif |
163 #ifdef INETD_MODE | 170 #ifdef INETD_MODE |
164 case 'i': | 171 case 'i': |
165 svr_opts.inetdmode = 1; | 172 svr_opts.inetdmode = 1; |