From: juphoff Date: Fri, 30 Jun 2000 22:18:39 +0000 (+0000) Subject: Security fix to syslog() calls. X-Git-Tag: nfs-utils-0-1-9~3 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=4550da4b992fb3627fef36760ff1b52739d335e0;p=nfs-utils.git Security fix to syslog() calls. --- 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"); }