Mercurial > dropbear
comparison svr-runopts.c @ 1499:2d450c1056e3
options: Complete the transition to numeric toggles (`#if')
For the sake of review, this commit alters only the code; the affiliated
comments within the source files also need to be updated, but doing so
now would obscure the operational changes that have been made here.
* All on/off options have been switched to the numeric `#if' variant;
that is the only way to make this `default_options.h.in' thing work
in a reasonable manner.
* There is now some very minor compile-time checking of the user's
choice of options.
* NO_FAST_EXPTMOD doesn't seem to be used, so it has been removed.
* ENABLE_USER_ALGO_LIST was supposed to be renamed DROPBEAR_USER_ALGO_LIST,
and this commit completes that work.
* DROPBEAR_FUZZ seems to be a relatively new, as-yet undocumented option,
which was added by the following commit:
commit 6e0b539e9ca0b5628c6c5a3d118ad6a2e79e8039
Author: Matt Johnston <[email protected]>
Date: Tue May 23 22:29:21 2017 +0800
split out checkpubkey_line() separately
It has now been added to `sysoptions.h' and defined as `0' by default.
* The configuration option `DROPBEAR_PASSWORD_ENV' is no longer listed in
`default_options.h.in'; it is no longer meant to be set by the user, and
is instead left to be defined in `sysoptions.h' (where it was already being
defined) as merely the name of the environment variable in question:
DROPBEAR_PASSWORD
To enable or disable use of that environment variable, the user must now
toggle `DROPBEAR_USE_DROPBEAR_PASSWORD'.
* The sFTP support is now toggled by setting `DROPBEAR_SFTPSERVER', and the
path of the sFTP server program is set independently through the usual
SFTPSERVER_PATH.
author | Michael Witten <mfwitten@gmail.com> |
---|---|
date | Thu, 20 Jul 2017 19:38:26 +0000 |
parents | a3a96dbf9a58 |
children | 5916af64acd4 3616ec41d03d ed930fd6f60f |
comparison
equal
deleted
inserted
replaced
1497:bf9c06b8dad9 | 1499:2d450c1056e3 |
---|---|
62 #ifdef DISABLE_SYSLOG | 62 #ifdef DISABLE_SYSLOG |
63 "(Syslog support not compiled in, using stderr)\n" | 63 "(Syslog support not compiled in, using stderr)\n" |
64 #else | 64 #else |
65 "-E Log to stderr rather than syslog\n" | 65 "-E Log to stderr rather than syslog\n" |
66 #endif | 66 #endif |
67 #ifdef DO_MOTD | 67 #if DO_MOTD |
68 "-m Don't display the motd on login\n" | 68 "-m Don't display the motd on login\n" |
69 #endif | 69 #endif |
70 "-w Disallow root logins\n" | 70 "-w Disallow root logins\n" |
71 #if DROPBEAR_SVR_PASSWORD_AUTH || DROPBEAR_SVR_PAM_AUTH | 71 #if DROPBEAR_SVR_PASSWORD_AUTH || DROPBEAR_SVR_PAM_AUTH |
72 "-s Disable password logins\n" | 72 "-s Disable password logins\n" |
86 " Listen on specified tcp port (and optionally address),\n" | 86 " Listen on specified tcp port (and optionally address),\n" |
87 " up to %d can be specified\n" | 87 " up to %d can be specified\n" |
88 " (default port is %s if none specified)\n" | 88 " (default port is %s if none specified)\n" |
89 "-P PidFile Create pid file PidFile\n" | 89 "-P PidFile Create pid file PidFile\n" |
90 " (default %s)\n" | 90 " (default %s)\n" |
91 #ifdef INETD_MODE | 91 #if INETD_MODE |
92 "-i Start for inetd\n" | 92 "-i Start for inetd\n" |
93 #endif | 93 #endif |
94 "-W <receive_window_buffer> (default %d, larger may be faster, max 1MB)\n" | 94 "-W <receive_window_buffer> (default %d, larger may be faster, max 1MB)\n" |
95 "-K <keepalive> (0 is never, default %d, in seconds)\n" | 95 "-K <keepalive> (0 is never, default %d, in seconds)\n" |
96 "-I <idle_timeout> (0 is never, default %d, in seconds)\n" | 96 "-I <idle_timeout> (0 is never, default %d, in seconds)\n" |
154 | 154 |
155 /* not yet | 155 /* not yet |
156 opts.ipv4 = 1; | 156 opts.ipv4 = 1; |
157 opts.ipv6 = 1; | 157 opts.ipv6 = 1; |
158 */ | 158 */ |
159 #ifdef DO_MOTD | 159 #if DO_MOTD |
160 svr_opts.domotd = 1; | 160 svr_opts.domotd = 1; |
161 #endif | 161 #endif |
162 #ifndef DISABLE_SYSLOG | 162 #ifndef DISABLE_SYSLOG |
163 opts.usingsyslog = 1; | 163 opts.usingsyslog = 1; |
164 #endif | 164 #endif |
208 break; | 208 break; |
209 case 'a': | 209 case 'a': |
210 opts.listen_fwd_all = 1; | 210 opts.listen_fwd_all = 1; |
211 break; | 211 break; |
212 #endif | 212 #endif |
213 #ifdef INETD_MODE | 213 #if INETD_MODE |
214 case 'i': | 214 case 'i': |
215 svr_opts.inetdmode = 1; | 215 svr_opts.inetdmode = 1; |
216 break; | 216 break; |
217 #endif | 217 #endif |
218 case 'p': | 218 case 'p': |
219 nextisport = 1; | 219 nextisport = 1; |
220 break; | 220 break; |
221 case 'P': | 221 case 'P': |
222 next = &svr_opts.pidfile; | 222 next = &svr_opts.pidfile; |
223 break; | 223 break; |
224 #ifdef DO_MOTD | 224 #if DO_MOTD |
225 /* motd is displayed by default, -m turns it off */ | 225 /* motd is displayed by default, -m turns it off */ |
226 case 'm': | 226 case 'm': |
227 svr_opts.domotd = 0; | 227 svr_opts.domotd = 0; |
228 break; | 228 break; |
229 #endif | 229 #endif |