From: Ted Lemon Date: Thu, 29 Jun 2000 20:05:18 +0000 (+0000) Subject: Put some extra paranoia in logging subroutines. X-Git-Tag: V3-BETA-2-PATCH-1~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f9e9f47a9bd8f4da0cacd42db50951d92f835d5;p=thirdparty%2Fdhcp.git Put some extra paranoia in logging subroutines. --- diff --git a/common/parse.c b/common/parse.c index a8650919b..d2bae6dfe 100644 --- a/common/parse.c +++ b/common/parse.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: parse.c,v 1.75 2000/06/20 19:59:50 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: parse.c,v 1.76 2000/06/29 20:05:18 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -3886,8 +3886,8 @@ int parse_warn (struct parse *cfile, const char *fmt, ...) lexbuf [lix] = 0; #ifndef DEBUG - syslog (log_priority | LOG_ERR, mbuf); - syslog (log_priority | LOG_ERR, cfile -> token_line); + syslog (log_priority | LOG_ERR, "%s", mbuf); + syslog (log_priority | LOG_ERR, "%s", cfile -> token_line); if (cfile -> lexchar < 81) syslog (log_priority | LOG_ERR, "%s^", lexbuf); #endif diff --git a/omapip/errwarn.c b/omapip/errwarn.c index 01502100e..9d391bca0 100644 --- a/omapip/errwarn.c +++ b/omapip/errwarn.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: errwarn.c,v 1.4 2000/03/17 04:00:12 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: errwarn.c,v 1.5 2000/06/29 20:05:13 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include @@ -72,7 +72,7 @@ void log_fatal (const char * fmt, ... ) va_end (list); #ifndef DEBUG - syslog (log_priority | LOG_ERR, mbuf); + syslog (log_priority | LOG_ERR, "%s", mbuf); #endif /* Also log it to stderr? */ @@ -104,7 +104,7 @@ int log_error (const char * fmt, ...) va_end (list); #ifndef DEBUG - syslog (log_priority | LOG_ERR, mbuf); + syslog (log_priority | LOG_ERR, "%s", mbuf); #endif if (log_perror) { @@ -128,7 +128,7 @@ int log_info (const char *fmt, ...) va_end (list); #ifndef DEBUG - syslog (log_priority | LOG_INFO, mbuf); + syslog (log_priority | LOG_INFO, "%s", mbuf); #endif if (log_perror) { @@ -152,7 +152,7 @@ int log_debug (const char *fmt, ...) va_end (list); #ifndef DEBUG - syslog (log_priority | LOG_DEBUG, mbuf); + syslog (log_priority | LOG_DEBUG, "%s", mbuf); #endif if (log_perror) {