Explorar o código

lib/error.c: added a proper format string to a call to syslog(3),
instead of using the logged string as the format string.

Wictor Lund %!s(int64=4) %!d(string=hai) anos
pai
achega
61df24e826
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      symon/lib/error.c

+ 1 - 1
symon/lib/error.c

@@ -93,7 +93,7 @@ output_message(int level, char *fmt, va_list args)
               __FILE__, __LINE__);
 
     if (flag_daemon) {
-        syslog(logmapping[loglevel].priority, msgbuf);
+        syslog(logmapping[loglevel].priority, "%s", msgbuf);
     } else {
         if (strlen(logmapping[loglevel].errtxt) > 0) {
             fprintf(logmapping[loglevel].stream == SYMON_OUT_STDERR ? stderr : stdout, "%.200s: %.200s\n",