diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 20 |
1 files changed, 11 insertions, 9 deletions
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" |
13 | RCSID("$OpenBSD: servconf.c,v 1.86 2001/06/26 17:41:49 dugsong Exp $"); | 13 | RCSID("$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; |