diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/servconf.c b/servconf.c index 02d06bdad..2d10963c4 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.80 2001/05/18 14:13:29 markus Exp $"); | 13 | RCSID("$OpenBSD: servconf.c,v 1.81 2001/05/19 19:43:57 stevesk Exp $"); |
14 | 14 | ||
15 | #ifdef KRB4 | 15 | #ifdef KRB4 |
16 | #include <krb.h> | 16 | #include <krb.h> |
@@ -429,11 +429,21 @@ parse_int: | |||
429 | 429 | ||
430 | case sLoginGraceTime: | 430 | case sLoginGraceTime: |
431 | intptr = &options->login_grace_time; | 431 | intptr = &options->login_grace_time; |
432 | goto parse_int; | 432 | parse_time: |
433 | arg = strdelim(&cp); | ||
434 | if (!arg || *arg == '\0') | ||
435 | fatal("%s line %d: missing time value.", | ||
436 | filename, linenum); | ||
437 | if ((value = convtime(arg)) == -1) | ||
438 | fatal("%s line %d: invalid time value.", | ||
439 | filename, linenum); | ||
440 | if (*intptr == -1) | ||
441 | *intptr = value; | ||
442 | break; | ||
433 | 443 | ||
434 | case sKeyRegenerationTime: | 444 | case sKeyRegenerationTime: |
435 | intptr = &options->key_regeneration_time; | 445 | intptr = &options->key_regeneration_time; |
436 | goto parse_int; | 446 | goto parse_time; |
437 | 447 | ||
438 | case sListenAddress: | 448 | case sListenAddress: |
439 | arg = strdelim(&cp); | 449 | arg = strdelim(&cp); |
@@ -792,12 +802,15 @@ parse_flag: | |||
792 | case sBanner: | 802 | case sBanner: |
793 | charptr = &options->banner; | 803 | charptr = &options->banner; |
794 | goto parse_filename; | 804 | goto parse_filename; |
805 | |||
795 | case sClientAliveInterval: | 806 | case sClientAliveInterval: |
796 | intptr = &options->client_alive_interval; | 807 | intptr = &options->client_alive_interval; |
797 | goto parse_int; | 808 | goto parse_time; |
809 | |||
798 | case sClientAliveCountMax: | 810 | case sClientAliveCountMax: |
799 | intptr = &options->client_alive_count_max; | 811 | intptr = &options->client_alive_count_max; |
800 | goto parse_int; | 812 | goto parse_int; |
813 | |||
801 | case sPAMAuthenticationViaKbdInt: | 814 | case sPAMAuthenticationViaKbdInt: |
802 | intptr = &options->pam_authentication_via_kbd_int; | 815 | intptr = &options->pam_authentication_via_kbd_int; |
803 | goto parse_flag; | 816 | goto parse_flag; |