From 4550da4b992fb3627fef36760ff1b52739d335e0 Mon Sep 17 00:00:00 2001 From: juphoff Date: Fri, 30 Jun 2000 22:18:39 +0000 Subject: [PATCH] Security fix to syslog() calls. --- tools/rpcgen/rpc_svcout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/rpcgen/rpc_svcout.c b/tools/rpcgen/rpc_svcout.c index 50c4ff9..f9ef79d 100644 --- a/tools/rpcgen/rpc_svcout.c +++ b/tools/rpcgen/rpc_svcout.c @@ -610,11 +610,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\t(void) fprintf(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"); } -- 2.39.5