summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--log.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6dcf19989..a4c59d413 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
120040719 120040719
2 - (djm) [log.c] bz #111: Escape more control characters when sending data
3 to syslog; from peak AT argo.troja.mff.cuni.cz
4
520040719
2 - (djm) [openbsd-compat/bsd-arc4random.c] Discard early keystream, like OpenBSD 6 - (djm) [openbsd-compat/bsd-arc4random.c] Discard early keystream, like OpenBSD
3 ok dtucker@ 7 ok dtucker@
4 - (djm) [auth-pam.c] Avoid use of xstrdup and friends in conversation function, 8 - (djm) [auth-pam.c] Avoid use of xstrdup and friends in conversation function,
@@ -1535,4 +1539,4 @@
1535 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 1539 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
1536 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 1540 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
1537 1541
1538$Id: ChangeLog,v 1.3480 2004/07/19 17:19:26 tim Exp $ 1542$Id: ChangeLog,v 1.3481 2004/07/21 00:52:13 djm Exp $
diff --git a/log.c b/log.c
index 0c4d5123a..5d8625d15 100644
--- a/log.c
+++ b/log.c
@@ -51,6 +51,9 @@ static char *argv0;
51 51
52extern char *__progname; 52extern char *__progname;
53 53
54#define LOG_SYSLOG_VIS (VIS_CSTYLE|VIS_NL|VIS_TAB|VIS_OCTAL)
55#define LOG_STDERR_VIS (VIS_SAFE|VIS_OCTAL)
56
54/* textual representation of log-facilities/levels */ 57/* textual representation of log-facilities/levels */
55 58
56static struct { 59static struct {
@@ -316,7 +319,8 @@ do_log(LogLevel level, const char *fmt, va_list args)
316 } else { 319 } else {
317 vsnprintf(msgbuf, sizeof(msgbuf), fmt, args); 320 vsnprintf(msgbuf, sizeof(msgbuf), fmt, args);
318 } 321 }
319 strnvis(fmtbuf, msgbuf, sizeof(fmtbuf), VIS_SAFE|VIS_OCTAL); 322 strnvis(fmtbuf, msgbuf, sizeof(fmtbuf),
323 log_on_stderr ? LOG_STDERR_VIS : LOG_SYSLOG_VIS);
320 if (log_on_stderr) { 324 if (log_on_stderr) {
321 snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf); 325 snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf);
322 write(STDERR_FILENO, msgbuf, strlen(msgbuf)); 326 write(STDERR_FILENO, msgbuf, strlen(msgbuf));