diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/servconf.c b/servconf.c index 43a2c111e..27c8671cf 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "includes.h" | 12 | #include "includes.h" |
13 | RCSID("$OpenBSD: servconf.c,v 1.66 2001/02/11 12:59:25 markus Exp $"); | 13 | RCSID("$OpenBSD: servconf.c,v 1.67 2001/02/12 16:16:23 markus Exp $"); |
14 | 14 | ||
15 | #ifdef KRB4 | 15 | #ifdef KRB4 |
16 | #include <krb.h> | 16 | #include <krb.h> |
@@ -51,7 +51,7 @@ initialize_server_options(ServerOptions *options) | |||
51 | options->server_key_bits = -1; | 51 | options->server_key_bits = -1; |
52 | options->login_grace_time = -1; | 52 | options->login_grace_time = -1; |
53 | options->key_regeneration_time = -1; | 53 | options->key_regeneration_time = -1; |
54 | options->permit_root_login = -1; | 54 | options->permit_root_login = PERMIT_NOT_SET; |
55 | options->ignore_rhosts = -1; | 55 | options->ignore_rhosts = -1; |
56 | options->ignore_user_known_hosts = -1; | 56 | options->ignore_user_known_hosts = -1; |
57 | options->print_motd = -1; | 57 | options->print_motd = -1; |
@@ -122,8 +122,8 @@ fill_default_server_options(ServerOptions *options) | |||
122 | options->login_grace_time = 600; | 122 | options->login_grace_time = 600; |
123 | if (options->key_regeneration_time == -1) | 123 | if (options->key_regeneration_time == -1) |
124 | options->key_regeneration_time = 3600; | 124 | options->key_regeneration_time = 3600; |
125 | if (options->permit_root_login == -1) | 125 | if (options->permit_root_login == PERMIT_NOT_SET) |
126 | options->permit_root_login = 1; /* yes */ | 126 | options->permit_root_login = PERMIT_YES; |
127 | if (options->ignore_rhosts == -1) | 127 | if (options->ignore_rhosts == -1) |
128 | options->ignore_rhosts = 1; | 128 | options->ignore_rhosts = 1; |
129 | if (options->ignore_user_known_hosts == -1) | 129 | if (options->ignore_user_known_hosts == -1) |
@@ -453,14 +453,17 @@ parse_filename: | |||
453 | exit(1); | 453 | exit(1); |
454 | } | 454 | } |
455 | if (strcmp(arg, "without-password") == 0) | 455 | if (strcmp(arg, "without-password") == 0) |
456 | value = 2; | 456 | value = PERMIT_NO_PASSWD; |
457 | else if (strcmp(arg, "forced-commands-only") == 0) | ||
458 | value = PERMIT_FORCED_ONLY; | ||
457 | else if (strcmp(arg, "yes") == 0) | 459 | else if (strcmp(arg, "yes") == 0) |
458 | value = 1; | 460 | value = PERMIT_YES; |
459 | else if (strcmp(arg, "no") == 0) | 461 | else if (strcmp(arg, "no") == 0) |
460 | value = 0; | 462 | value = PERMIT_NO; |
461 | else { | 463 | else { |
462 | fprintf(stderr, "%s line %d: Bad yes/without-password/no argument: %s\n", | 464 | fprintf(stderr, "%s line %d: Bad yes/" |
463 | filename, linenum, arg); | 465 | "without-password/forced-commands-only/no " |
466 | "argument: %s\n", filename, linenum, arg); | ||
464 | exit(1); | 467 | exit(1); |
465 | } | 468 | } |
466 | if (*intptr == -1) | 469 | if (*intptr == -1) |