From a714f366ce1672e81fff0717e8e2873fff90acb2 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 30 Jun 2000 06:38:07 +0000 Subject: * sunrpc/rpc_svcout.c (write_msg_out): Always use format string with syslog. (print_err_message): Likewise. Reported by Chris Evans . --- sunrpc/rpc_svcout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sunrpc') diff --git a/sunrpc/rpc_svcout.c b/sunrpc/rpc_svcout.c index 5326c370c2..4cd7c6cad0 100644 --- a/sunrpc/rpc_svcout.c +++ b/sunrpc/rpc_svcout.c @@ -758,11 +758,11 @@ static void print_err_message (const char *space) { if (logflag) - f_print (fout, "%ssyslog (LOG_ERR, \"%s\");\n", space, _errbuf); + f_print (fout, "%ssyslog (LOG_ERR, \"%%s\", \"%s\");\n", space, _errbuf); else if (inetdflag || pmflag) f_print (fout, "%s_msgout (\"%s\");\n", space, _errbuf); else - f_print (fout, "%sfprintf (stderr, \"%s\");\n", space, _errbuf); + f_print (fout, "%sfprintf (stderr, \"%%s\", \"%s\");\n", space, _errbuf); } /* @@ -799,11 +799,11 @@ write_msg_out (void) f_print (fout, "#ifdef RPC_SVC_FG\n"); if (inetdflag || pmflag) f_print (fout, "\tif (_rpcpmstart)\n"); - f_print (fout, "\t\tsyslog (LOG_ERR, msg);\n"); + f_print (fout, "\t\tsyslog (LOG_ERR, \"%%s\", msg);\n"); f_print (fout, "\telse\n"); f_print (fout, "\t\tfprintf (stderr, \"%%s\\n\", msg);\n"); f_print (fout, "#else\n"); - f_print (fout, "\tsyslog (LOG_ERR, msg);\n"); + f_print (fout, "\tsyslog (LOG_ERR, \"%%s\", msg);\n"); f_print (fout, "#endif\n"); f_print (fout, "}\n"); } -- cgit 1.4.1