From 37fde5401d7660825598e566a055de4dea61fec8 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 28 Jun 2000 23:58:49 +0000 Subject: make _msgout() use syslog() with a %s, for future safety --- usr.sbin/ypserv/yppush/yppush_svc.c | 8 ++++---- usr.sbin/ypserv/ypserv/ypserv.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.sbin/ypserv/yppush/yppush_svc.c b/usr.sbin/ypserv/yppush/yppush_svc.c index 16d5c318d9e..3d67eadd507 100644 --- a/usr.sbin/ypserv/yppush/yppush_svc.c +++ b/usr.sbin/ypserv/yppush/yppush_svc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yppush_svc.c,v 1.2 1996/05/30 09:53:22 deraadt Exp $ */ +/* $OpenBSD: yppush_svc.c,v 1.3 2000/06/28 23:58:24 deraadt Exp $ */ /* * Copyright (c) 1996 Mats O Jansson @@ -32,7 +32,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: yppush_svc.c,v 1.2 1996/05/30 09:53:22 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: yppush_svc.c,v 1.3 2000/06/28 23:58:24 deraadt Exp $"; #endif /* not lint */ #include "yppush.h" @@ -70,11 +70,11 @@ void _msgout(msg) { #ifdef RPC_SVC_FG if (_rpcpmstart) - syslog(LOG_ERR, msg); + syslog(LOG_ERR, "%s", msg); else (void) fprintf(stderr, "%s\n", msg); #else - syslog(LOG_ERR, msg); + syslog(LOG_ERR, "%s", msg); #endif } diff --git a/usr.sbin/ypserv/ypserv/ypserv.c b/usr.sbin/ypserv/ypserv/ypserv.c index 9ef53a15d4a..c48cf6ecf4a 100644 --- a/usr.sbin/ypserv/ypserv/ypserv.c +++ b/usr.sbin/ypserv/ypserv/ypserv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypserv.c,v 1.12 1997/11/04 07:40:52 deraadt Exp $ */ +/* $OpenBSD: ypserv.c,v 1.13 2000/06/28 23:58:48 deraadt Exp $ */ /* * Copyright (c) 1994 Mats O Jansson @@ -32,7 +32,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: ypserv.c,v 1.12 1997/11/04 07:40:52 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ypserv.c,v 1.13 2000/06/28 23:58:48 deraadt Exp $"; #endif #include "yp.h" @@ -87,11 +87,11 @@ void _msgout(char* msg) { #ifdef RPC_SVC_FG if (_rpcpmstart) - syslog(LOG_ERR, msg); + syslog(LOG_ERR, "%s", msg); else (void) fprintf(stderr, "%s\n", msg); #else - syslog(LOG_ERR, msg); + syslog(LOG_ERR, "%s", msg); #endif } -- cgit v1.2.3