summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-05 19:59:08 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-05 19:59:08 +0000
commit1bda4c835e2fb1c8a9088f9d1011ae404ab8cd85 (patch)
tree8324d761b353f64cc150e28c51e96b27c351c0ed /servconf.c
parentbd0e2de8e59b4588a45a27c168e70bba95db9969 (diff)
downloadopenssh-git-1bda4c835e2fb1c8a9088f9d1011ae404ab8cd85.tar.gz
- stevesk@cvs.openbsd.org 2001/05/19 19:43:57
[misc.c misc.h servconf.c sshd.8 sshd.c] sshd command-line arguments and configuration file options that specify time may be expressed using a sequence of the form: time[qualifier], where time is a positive integer value and qualifier is one of the following: <none>,s,m,h,d,w Examples: 600 600 seconds (10 minutes) 10m 10 minutes 1h30m 1 hour 30 minutes (90 minutes) ok markus@
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/servconf.c b/servconf.c
index 02d06bda..2d10963c 100644
--- a/servconf.c
+++ b/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>
@@ -429,11 +429,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);
@@ -792,12 +802,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;
+
case sPAMAuthenticationViaKbdInt:
intptr = &options->pam_authentication_via_kbd_int;
goto parse_flag;