diff options
author | des <des@FreeBSD.org> | 2003-04-23 16:53:02 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-04-23 16:53:02 +0000 |
commit | 6d34992e86f885f08b7df6e18a0b6af25ec2d664 (patch) | |
tree | 1a380064758bab3bc985ef1cc15a7b6633825c0f /crypto/openssh/log.c | |
parent | df96ff7f3774ba5a36cf1c6729762872945cc60a (diff) | |
parent | 85b37b9574631df0f7e774dda373514195c74b29 (diff) | |
download | FreeBSD-src-6d34992e86f885f08b7df6e18a0b6af25ec2d664.zip FreeBSD-src-6d34992e86f885f08b7df6e18a0b6af25ec2d664.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r113908,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'crypto/openssh/log.c')
-rw-r--r-- | crypto/openssh/log.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/crypto/openssh/log.c b/crypto/openssh/log.c index 96626d7..84e4ce0 100644 --- a/crypto/openssh/log.c +++ b/crypto/openssh/log.c @@ -34,7 +34,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: log.c,v 1.24 2002/07/19 15:43:33 markus Exp $"); +RCSID("$OpenBSD: log.c,v 1.25 2003/01/11 18:29:43 markus Exp $"); #include "log.h" #include "xmalloc.h" @@ -233,6 +233,7 @@ fatal_remove_all_cleanups(void) next_cu = cu->next; xfree(cu); } + fatal_cleanups = NULL; } /* Cleanup and exit */ @@ -386,11 +387,14 @@ do_log(LogLevel level, const char *fmt, va_list args) } else { vsnprintf(msgbuf, sizeof(msgbuf), fmt, args); } + /* Escape magic chars in output. */ + strnvis(fmtbuf, msgbuf, sizeof(fmtbuf), VIS_OCTAL); + if (log_on_stderr) { - fprintf(stderr, "%s\r\n", msgbuf); + fprintf(stderr, "%s\r\n", fmtbuf); } else { openlog(argv0 ? argv0 : __progname, LOG_PID, log_facility); - syslog(pri, "%.500s", msgbuf); + syslog(pri, "%.500s", fmtbuf); closelog(); } } |