diff options
Diffstat (limited to 'usr.bin/ssh/servconf.c')
-rw-r--r-- | usr.bin/ssh/servconf.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 40c2e1035df..36c7f601d30 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/servconf.c @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: servconf.c,v 1.80 2001/05/18 14:13:29 markus Exp $"); +RCSID("$OpenBSD: servconf.c,v 1.81 2001/05/19 19:43:57 stevesk Exp $"); #ifdef KRB4 #include <krb.h> @@ -425,11 +425,21 @@ parse_int: case sLoginGraceTime: intptr = &options->login_grace_time; - goto parse_int; +parse_time: + arg = strdelim(&cp); + if (!arg || *arg == '\0') + fatal("%s line %d: missing time value.", + filename, linenum); + if ((value = convtime(arg)) == -1) + fatal("%s line %d: invalid time value.", + filename, linenum); + if (*intptr == -1) + *intptr = value; + break; case sKeyRegenerationTime: intptr = &options->key_regeneration_time; - goto parse_int; + goto parse_time; case sListenAddress: arg = strdelim(&cp); @@ -788,12 +798,15 @@ parse_flag: case sBanner: charptr = &options->banner; goto parse_filename; + case sClientAliveInterval: intptr = &options->client_alive_interval; - goto parse_int; + goto parse_time; + case sClientAliveCountMax: intptr = &options->client_alive_count_max; goto parse_int; + default: fatal("%s line %d: Missing handler for opcode %s (%d)", filename, linenum, arg, opcode); |