summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-02-05 12:26:34 +1100
committerDamien Miller <djm@mindrot.org>2002-02-05 12:26:34 +1100
commitfcd9320440c7eb2758659ec2ac19b99054e43044 (patch)
treebb61ee56c4a5311027d9ac7e593a5f957267ab2f /servconf.c
parent9b74bfc5be938d1bf5012c997c463b621c4fbffd (diff)
- markus@cvs.openbsd.org 2002/02/04 12:15:25
[log.c log.h readconf.c servconf.c] add SYSLOG_FACILITY_NOT_SET = -1, SYSLOG_LEVEL_NOT_SET = -1, fixes arm/netbsd; based on patch from bjh21@netbsd.org; ok djm@
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/servconf.c b/servconf.c
index 8273df54c..9bbd994ca 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.100 2002/01/29 14:32:03 markus Exp $"); 13RCSID("$OpenBSD: servconf.c,v 1.101 2002/02/04 12:15:25 markus Exp $");
14 14
15#if defined(KRB4) || defined(KRB5) 15#if defined(KRB4) || defined(KRB5)
16#include <krb.h> 16#include <krb.h>
@@ -67,8 +67,8 @@ initialize_server_options(ServerOptions *options)
67 options->xauth_location = NULL; 67 options->xauth_location = NULL;
68 options->strict_modes = -1; 68 options->strict_modes = -1;
69 options->keepalives = -1; 69 options->keepalives = -1;
70 options->log_facility = (SyslogFacility) - 1; 70 options->log_facility = SYSLOG_FACILITY_NOT_SET;
71 options->log_level = (LogLevel) - 1; 71 options->log_level = SYSLOG_LEVEL_NOT_SET;
72 options->rhosts_authentication = -1; 72 options->rhosts_authentication = -1;
73 options->rhosts_rsa_authentication = -1; 73 options->rhosts_rsa_authentication = -1;
74 options->hostbased_authentication = -1; 74 options->hostbased_authentication = -1;
@@ -168,9 +168,9 @@ fill_default_server_options(ServerOptions *options)
168 options->strict_modes = 1; 168 options->strict_modes = 1;
169 if (options->keepalives == -1) 169 if (options->keepalives == -1)
170 options->keepalives = 1; 170 options->keepalives = 1;
171 if (options->log_facility == (SyslogFacility) (-1)) 171 if (options->log_facility == SYSLOG_FACILITY_NOT_SET)
172 options->log_facility = SYSLOG_FACILITY_AUTH; 172 options->log_facility = SYSLOG_FACILITY_AUTH;
173 if (options->log_level == (LogLevel) (-1)) 173 if (options->log_level == SYSLOG_LEVEL_NOT_SET)
174 options->log_level = SYSLOG_LEVEL_INFO; 174 options->log_level = SYSLOG_LEVEL_INFO;
175 if (options->rhosts_authentication == -1) 175 if (options->rhosts_authentication == -1)
176 options->rhosts_authentication = 0; 176 options->rhosts_authentication = 0;
@@ -696,7 +696,7 @@ parse_flag:
696 intptr = (int *) &options->log_facility; 696 intptr = (int *) &options->log_facility;
697 arg = strdelim(&cp); 697 arg = strdelim(&cp);
698 value = log_facility_number(arg); 698 value = log_facility_number(arg);
699 if (value == (SyslogFacility) - 1) 699 if (value == SYSLOG_FACILITY_NOT_SET)
700 fatal("%.200s line %d: unsupported log facility '%s'", 700 fatal("%.200s line %d: unsupported log facility '%s'",
701 filename, linenum, arg ? arg : "<NONE>"); 701 filename, linenum, arg ? arg : "<NONE>");
702 if (*intptr == -1) 702 if (*intptr == -1)
@@ -707,7 +707,7 @@ parse_flag:
707 intptr = (int *) &options->log_level; 707 intptr = (int *) &options->log_level;
708 arg = strdelim(&cp); 708 arg = strdelim(&cp);
709 value = log_level_number(arg); 709 value = log_level_number(arg);
710 if (value == (LogLevel) - 1) 710 if (value == SYSLOG_LEVEL_NOT_SET)
711 fatal("%.200s line %d: unsupported log level '%s'", 711 fatal("%.200s line %d: unsupported log level '%s'",
712 filename, linenum, arg ? arg : "<NONE>"); 712 filename, linenum, arg ? arg : "<NONE>");
713 if (*intptr == -1) 713 if (*intptr == -1)