diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/servconf.c b/servconf.c index b08ac671f..800c4d5f4 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$Id: servconf.c,v 1.9 2000/03/09 10:27:51 damien Exp $"); | 15 | RCSID("$Id: servconf.c,v 1.10 2000/04/12 08:45:06 damien Exp $"); |
16 | 16 | ||
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "servconf.h" | 18 | #include "servconf.h" |
@@ -31,6 +31,7 @@ initialize_server_options(ServerOptions *options) | |||
31 | options->ports_from_cmdline = 0; | 31 | options->ports_from_cmdline = 0; |
32 | options->listen_addrs = NULL; | 32 | options->listen_addrs = NULL; |
33 | options->host_key_file = NULL; | 33 | options->host_key_file = NULL; |
34 | options->dsa_key_file = NULL; | ||
34 | options->server_key_bits = -1; | 35 | options->server_key_bits = -1; |
35 | options->login_grace_time = -1; | 36 | options->login_grace_time = -1; |
36 | options->key_regeneration_time = -1; | 37 | options->key_regeneration_time = -1; |
@@ -78,6 +79,8 @@ fill_default_server_options(ServerOptions *options) | |||
78 | add_listen_addr(options, NULL); | 79 | add_listen_addr(options, NULL); |
79 | if (options->host_key_file == NULL) | 80 | if (options->host_key_file == NULL) |
80 | options->host_key_file = HOST_KEY_FILE; | 81 | options->host_key_file = HOST_KEY_FILE; |
82 | if (options->dsa_key_file == NULL) | ||
83 | options->dsa_key_file = DSA_KEY_FILE; | ||
81 | if (options->server_key_bits == -1) | 84 | if (options->server_key_bits == -1) |
82 | options->server_key_bits = 768; | 85 | options->server_key_bits = 768; |
83 | if (options->login_grace_time == -1) | 86 | if (options->login_grace_time == -1) |
@@ -159,7 +162,7 @@ typedef enum { | |||
159 | sPrintMotd, sIgnoreRhosts, sX11Forwarding, sX11DisplayOffset, | 162 | sPrintMotd, sIgnoreRhosts, sX11Forwarding, sX11DisplayOffset, |
160 | sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sCheckMail, | 163 | sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sCheckMail, |
161 | sUseLogin, sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, | 164 | sUseLogin, sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, |
162 | sIgnoreUserKnownHosts | 165 | sIgnoreUserKnownHosts, sDSAKeyFile |
163 | } ServerOpCodes; | 166 | } ServerOpCodes; |
164 | 167 | ||
165 | /* Textual representation of the tokens. */ | 168 | /* Textual representation of the tokens. */ |
@@ -169,6 +172,7 @@ static struct { | |||
169 | } keywords[] = { | 172 | } keywords[] = { |
170 | { "port", sPort }, | 173 | { "port", sPort }, |
171 | { "hostkey", sHostKeyFile }, | 174 | { "hostkey", sHostKeyFile }, |
175 | { "dsakey", sDSAKeyFile }, | ||
172 | { "serverkeybits", sServerKeyBits }, | 176 | { "serverkeybits", sServerKeyBits }, |
173 | { "logingracetime", sLoginGraceTime }, | 177 | { "logingracetime", sLoginGraceTime }, |
174 | { "keyregenerationinterval", sKeyRegenerationTime }, | 178 | { "keyregenerationinterval", sKeyRegenerationTime }, |
@@ -338,7 +342,9 @@ parse_int: | |||
338 | break; | 342 | break; |
339 | 343 | ||
340 | case sHostKeyFile: | 344 | case sHostKeyFile: |
341 | charptr = &options->host_key_file; | 345 | case sDSAKeyFile: |
346 | charptr = (opcode == sHostKeyFile ) ? | ||
347 | &options->host_key_file : &options->dsa_key_file; | ||
342 | cp = strtok(NULL, WHITESPACE); | 348 | cp = strtok(NULL, WHITESPACE); |
343 | if (!cp) { | 349 | if (!cp) { |
344 | fprintf(stderr, "%s line %d: missing file name.\n", | 350 | fprintf(stderr, "%s line %d: missing file name.\n", |