summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-09 01:28:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-06-09 01:28:07 +0000
commita2c5856fb1e9411a43c832b5b325c60f0eb9a770 (patch)
tree1f29a10ae623abaf0fde2a06879189ddbb77d2b7 /usr.bin
parent82f43d6d18514d33c4373400fcf7baa5931275f8 (diff)
i think the TLI rpcgen side generates a format string bug on output... but
we do not use that stuff. attempt to fix it, but unable to test
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rpcgen/rpc_svcout.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c
index 2d0292a83cb..81f83a4fc55 100644
--- a/usr.bin/rpcgen/rpc_svcout.c
+++ b/usr.bin/rpcgen/rpc_svcout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc_svcout.c,v 1.12 2002/06/01 01:40:38 deraadt Exp $ */
+/* $OpenBSD: rpc_svcout.c,v 1.13 2002/06/09 01:28:06 deraadt Exp $ */
/* $NetBSD: rpc_svcout.c,v 1.7 1995/06/24 14:59:59 pk Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -574,7 +574,7 @@ print_err_message(space)
char *space;
{
if (logflag)
- fprintf(fout, "%ssyslog(LOG_ERR, \"%s\");\n", space, _errbuf);
+ fprintf(fout, "%ssyslog(LOG_ERR, \"%%s\", \"%s\");\n", space, _errbuf);
else if (inetdflag || pmflag)
fprintf(fout, "%s_msgout(\"%s\");\n", space, _errbuf);
else
@@ -614,12 +614,12 @@ write_msg_out()
fprintf(fout, "#ifdef RPC_SVC_FG\n");
if (inetdflag || pmflag)
fprintf(fout, "\tif (_rpcpmstart)\n");
- fprintf(fout, "\t\tsyslog(LOG_ERR, msg);\n");
+ fprintf(fout, "\t\tsyslog(LOG_ERR, \"%%s\", msg);\n");
fprintf(fout, "\telse {\n");
fprintf(fout, "\t\t(void) write(STDERR_FILENO, msg, strlen(msg));\n");
fprintf(fout, "\t\t(void) write(STDERR_FILENO, \"\\n\", 1);\n");
fprintf(fout, "\t}\n#else\n");
- fprintf(fout, "\tsyslog(LOG_ERR, msg);\n");
+ fprintf(fout, "\tsyslog(LOG_ERR, \"%%s\", msg);\n");
fprintf(fout, "#endif\n");
fprintf(fout, "}\n");
}