summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-06-28 23:58:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-06-28 23:58:49 +0000
commit37fde5401d7660825598e566a055de4dea61fec8 (patch)
tree12bf98e2e06e5285951e82d8f488230197d668a4 /usr.sbin
parent33f601976512e550630a55b1b5e60f8fb225ab05 (diff)
make _msgout() use syslog() with a %s, for future safety
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ypserv/yppush/yppush_svc.c8
-rw-r--r--usr.sbin/ypserv/ypserv/ypserv.c8
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 <moj@stacken.kth.se>
@@ -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 <moj@stacken.kth.se>
@@ -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
}