summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authormouring <mouring>2001-06-05 19:59:08 +0000
committermouring <mouring>2001-06-05 19:59:08 +0000
commita2cd3e3ccedfcdf340ee0d5228d51b0f5f16c501 (patch)
tree67e23c4b2410b03e5af9d48f70d9a495957c1a01 /servconf.c
parentfd3182af9e577e38467c6e2de97d2bf7bc7d130b (diff)
downloadopenssh-a2cd3e3ccedfcdf340ee0d5228d51b0f5f16c501.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;