]> andersk Git - openssh.git/blobdiff - servconf.c
- markus@cvs.openbsd.org 2002/02/04 12:15:25
[openssh.git] / servconf.c
index 8273df54cb2ed5737ee4367ecfa5371616d22dbe..9bbd994ca556417462dee5f9dbfcc79eeb4789b0 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: servconf.c,v 1.100 2002/01/29 14:32:03 markus Exp $");
+RCSID("$OpenBSD: servconf.c,v 1.101 2002/02/04 12:15:25 markus Exp $");
 
 #if defined(KRB4) || defined(KRB5)
 #include <krb.h>
@@ -67,8 +67,8 @@ initialize_server_options(ServerOptions *options)
        options->xauth_location = NULL;
        options->strict_modes = -1;
        options->keepalives = -1;
-       options->log_facility = (SyslogFacility) - 1;
-       options->log_level = (LogLevel) - 1;
+       options->log_facility = SYSLOG_FACILITY_NOT_SET;
+       options->log_level = SYSLOG_LEVEL_NOT_SET;
        options->rhosts_authentication = -1;
        options->rhosts_rsa_authentication = -1;
        options->hostbased_authentication = -1;
@@ -168,9 +168,9 @@ fill_default_server_options(ServerOptions *options)
                options->strict_modes = 1;
        if (options->keepalives == -1)
                options->keepalives = 1;
-       if (options->log_facility == (SyslogFacility) (-1))
+       if (options->log_facility == SYSLOG_FACILITY_NOT_SET)
                options->log_facility = SYSLOG_FACILITY_AUTH;
-       if (options->log_level == (LogLevel) (-1))
+       if (options->log_level == SYSLOG_LEVEL_NOT_SET)
                options->log_level = SYSLOG_LEVEL_INFO;
        if (options->rhosts_authentication == -1)
                options->rhosts_authentication = 0;
@@ -696,7 +696,7 @@ parse_flag:
                intptr = (int *) &options->log_facility;
                arg = strdelim(&cp);
                value = log_facility_number(arg);
-               if (value == (SyslogFacility) - 1)
+               if (value == SYSLOG_FACILITY_NOT_SET)
                        fatal("%.200s line %d: unsupported log facility '%s'",
                            filename, linenum, arg ? arg : "<NONE>");
                if (*intptr == -1)
@@ -707,7 +707,7 @@ parse_flag:
                intptr = (int *) &options->log_level;
                arg = strdelim(&cp);
                value = log_level_number(arg);
-               if (value == (LogLevel) - 1)
+               if (value == SYSLOG_LEVEL_NOT_SET)
                        fatal("%.200s line %d: unsupported log level '%s'",
                            filename, linenum, arg ? arg : "<NONE>");
                if (*intptr == -1)
This page took 0.784223 seconds and 4 git commands to generate.