summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-07-14 12:17:33 +1000
committerDamien Miller <djm@mindrot.org>2001-07-14 12:17:33 +1000
commit40857852760cec8b0207fccfd4e091ea9fc953dd (patch)
treefebe3507a41c900a85ee5a5ec299b60f50529353
parent40eb1d82bb92c9b1f0d5b40367b6f2aca7a8aca6 (diff)
- OpenBSD CVS Sync
- stevesk@cvs.openbsd.org 2001/07/08 15:23:38 [servconf.c] fix ``MaxStartups max''; ok markus@
-rw-r--r--ChangeLog5
-rw-r--r--servconf.c20
2 files changed, 15 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index f3ef541c6..cfa3983cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,9 @@
22 - stevesk@cvs.openbsd.org 2001/07/05 20:32:47 22 - stevesk@cvs.openbsd.org 2001/07/05 20:32:47
23 [sshconnect1.c] 23 [sshconnect1.c]
24 statement after label; ok dugsong@ 24 statement after label; ok dugsong@
25 - stevesk@cvs.openbsd.org 2001/07/08 15:23:38
26 [servconf.c]
27 fix ``MaxStartups max''; ok markus@
25 28
2620010711 2920010711
27 - (djm) dirname(3) may modify its argument on glibc and other systems. 30 - (djm) dirname(3) may modify its argument on glibc and other systems.
@@ -5997,4 +6000,4 @@
5997 - Wrote replacements for strlcpy and mkdtemp 6000 - Wrote replacements for strlcpy and mkdtemp
5998 - Released 1.0pre1 6001 - Released 1.0pre1
5999 6002
6000$Id: ChangeLog,v 1.1391 2001/07/14 02:16:59 djm Exp $ 6003$Id: ChangeLog,v 1.1392 2001/07/14 02:17:33 djm Exp $
diff --git a/servconf.c b/servconf.c
index 858ad3164..47eb66d83 100644
--- a/servconf.c
+++ b/servconf.c
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include "includes.h" 12#include "includes.h"
13RCSID("$OpenBSD: servconf.c,v 1.86 2001/06/26 17:41:49 dugsong Exp $"); 13RCSID("$OpenBSD: servconf.c,v 1.87 2001/07/08 15:23:38 stevesk Exp $");
14 14
15#ifdef KRB4 15#ifdef KRB4
16#include <krb.h> 16#include <krb.h>
@@ -389,7 +389,7 @@ read_server_config(ServerOptions *options, const char *filename)
389 int linenum, *intptr, value; 389 int linenum, *intptr, value;
390 int bad_options = 0; 390 int bad_options = 0;
391 ServerOpCodes opcode; 391 ServerOpCodes opcode;
392 int i; 392 int i, n;
393 393
394 f = fopen(filename, "r"); 394 f = fopen(filename, "r");
395 if (!f) { 395 if (!f) {
@@ -801,20 +801,22 @@ parse_flag:
801 if (!arg || *arg == '\0') 801 if (!arg || *arg == '\0')
802 fatal("%s line %d: Missing MaxStartups spec.", 802 fatal("%s line %d: Missing MaxStartups spec.",
803 filename, linenum); 803 filename, linenum);
804 if (sscanf(arg, "%d:%d:%d", 804 if ((n = sscanf(arg, "%d:%d:%d",
805 &options->max_startups_begin, 805 &options->max_startups_begin,
806 &options->max_startups_rate, 806 &options->max_startups_rate,
807 &options->max_startups) == 3) { 807 &options->max_startups)) == 3) {
808 if (options->max_startups_begin > 808 if (options->max_startups_begin >
809 options->max_startups || 809 options->max_startups ||
810 options->max_startups_rate > 100 || 810 options->max_startups_rate > 100 ||
811 options->max_startups_rate < 1) 811 options->max_startups_rate < 1)
812 fatal("%s line %d: Illegal MaxStartups spec.",
813 filename, linenum);
814 } else if (n != 1)
812 fatal("%s line %d: Illegal MaxStartups spec.", 815 fatal("%s line %d: Illegal MaxStartups spec.",
813 filename, linenum); 816 filename, linenum);
814 break; 817 else
815 } 818 options->max_startups = options->max_startups_begin;
816 intptr = &options->max_startups; 819 break;
817 goto parse_int;
818 820
819 case sBanner: 821 case sBanner:
820 charptr = &options->banner; 822 charptr = &options->banner;