aboutsummaryrefslogtreecommitdiff
path: root/sunrpc
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-06-30 06:38:07 +0000
committerAndreas Jaeger <aj@suse.de>2000-06-30 06:38:07 +0000
commita714f366ce1672e81fff0717e8e2873fff90acb2 (patch)
tree1d48f23de55d3a2ce21bf0155def92fb81df9a30 /sunrpc
parente43e0dd6b3ecdbf8980d0bfd47cea208ee8e9062 (diff)
downloadglibc-a714f366ce1672e81fff0717e8e2873fff90acb2.tar
glibc-a714f366ce1672e81fff0717e8e2873fff90acb2.tar.gz
glibc-a714f366ce1672e81fff0717e8e2873fff90acb2.tar.bz2
glibc-a714f366ce1672e81fff0717e8e2873fff90acb2.zip
* sunrpc/rpc_svcout.c (write_msg_out): Always use format string
with syslog. (print_err_message): Likewise. Reported by Chris Evans <chris@ferret.lmh.ox.ac.uk>.
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/rpc_svcout.c8
1 files changed, 4 insertions, 4 deletions
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");
}