Fix more IAuth bugs and add IAUTH log target.
[ircu2.10.12-pk.git] / ircd / ircd_log.c
index aa819b880048ec179187a205fa136d6ace74a285..6251842b761c509c273280184c65e3fa98145cb7 100644 (file)
@@ -38,7 +38,7 @@
 #include "send.h"
 #include "struct.h"
 
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <errno.h>
 #include <fcntl.h>
 #include <stdarg.h>
@@ -52,6 +52,8 @@
 #include <time.h>
 #include <unistd.h>
 
+int log_inassert = 0;
+
 #define LOG_BUFSIZE 2048 /**< Maximum length for a log message. */
 
 /** Select default log level cutoff. */
@@ -160,8 +162,8 @@ static struct LogDesc {
   S(OPER, -1, SNO_OLDREALOP),
   S(RESOLVER, -1, 0),
   S(SOCKET, -1, 0),
+  S(IAUTH, -1, SNO_NETWORK),
   S(DEBUG, -1, SNO_DEBUG),
-  S(OLDLOG, -1, 0),
 #undef S
   { LS_LAST_SYSTEM, 0, 0, -1, 0, -1, 0 }
 };
@@ -195,7 +197,7 @@ log_open(struct LogFile *lf)
   if (lf && lf->fd < 0) {
     alarm(3); /* if NFS hangs, we hang only for 3 seconds */
     lf->fd = open(lf->file, O_WRONLY | O_CREAT | O_APPEND,
-                 S_IREAD | S_IWRITE);
+                 S_IRUSR | S_IWUSR);
     alarm(0);
   }
 }
@@ -827,7 +829,7 @@ log_get_snomask(const char *subsys)
   return log_sno_name(desc->snomask);
 }
 
-/** Set the verbosity level for a subystem.
+/** Set the verbosity level for a subsystem.
  * @param[in] subsys Subsystem name.
  * @param[in] level Minimum log level.
  * @return Zero on success; non-zero on error.