]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Security fix to syslog() calls.
authorjuphoff <juphoff>
Fri, 30 Jun 2000 22:18:39 +0000 (22:18 +0000)
committerjuphoff <juphoff>
Fri, 30 Jun 2000 22:18:39 +0000 (22:18 +0000)
tools/rpcgen/rpc_svcout.c

index 50c4ff97828d893e7b5294379c4ed3e3defe87c3..f9ef79d62be1aa1920ddd952eb642e33e512eaa1 100644 (file)
@@ -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");
 }