]> andersk Git - openssh.git/blobdiff - log.c
*** empty log message ***
[openssh.git] / log.c
diff --git a/log.c b/log.c
index 96626d7d4dab379a948b8d6ceb86a333f7246916..685717aef8c24226a912107393f92574aa762646 100644 (file)
--- a/log.c
+++ b/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"
@@ -127,7 +127,7 @@ error(const char *fmt,...)
 /* Log this message (information that usually should go to the log). */
 
 void
-log(const char *fmt,...)
+logit(const char *fmt,...)
 {
        va_list args;
 
@@ -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();
        }
 }
This page took 0.034886 seconds and 4 git commands to generate.