mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-01 12:19:28 +00:00
Don't generate syslog() statements which have format string vulnerabilities.
MFC after: 1 week
This commit is contained in:
parent
2c0643afde
commit
69c828c6bc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=79295
@ -769,12 +769,12 @@ 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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user