search for: log_handler

Displaying 6 results from an estimated 6 matches for "log_handler".

Did you mean: bug_handler
2011 Jun 02
2
preauth privsep logging via monitor
.../openssh/log.c,v retrieving revision 1.54 diff -u -p -r1.54 log.c --- log.c 10 Jun 2008 13:01:51 -0000 1.54 +++ log.c 2 Jun 2011 03:59:56 -0000 @@ -56,6 +56,8 @@ static LogLevel log_level = SYSLOG_LEVEL static int log_on_stderr = 1; static int log_facility = LOG_AUTH; static char *argv0; +static log_handler_fn *log_handler; +static void *log_handler_ctx; extern char *__progname; @@ -260,6 +262,9 @@ log_init(char *av0, LogLevel level, Sysl exit(1); } + log_handler = NULL; + log_handler_ctx = NULL; + log_on_stderr = on_stderr; if (on_stderr) return; @@ -327,6 +332,23 @@ log_init(char...
2012 Dec 05
1
[PATCH] Large log output does not print newline
Hi, I think I found a minor bug in OpenSSH's log functionality: If a log message which is larger than MSGBUFSIZE=1024 and logged to stderr, then the newline (\r\n) is not printed. This is due to the fact that the newline is added after the log message concatenated with "\r\n" is snprintf'd to another buffer of the same size. If the source buffer (fmtbuf) would already fill the
2015 Jul 06
3
[PATCH v2 1/1] paint visual host key with unicode box-drawing characters
...++++++++++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 58 insertions(+), 21 deletions(-) diff --git a/log.c b/log.c index 32e1d2e..90c1232 100644 --- a/log.c +++ b/log.c @@ -444,7 +444,7 @@ do_log(LogLevel level, const char *fmt, va_list args) tmp_handler(level, fmtbuf, log_handler_ctx); log_handler = tmp_handler; } else if (log_on_stderr) { - snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf); + /* we want unicode multi byte characters, so do not use fmtbuf here */ (void)write(log_stderr_fd, msgbuf, strlen(msgbuf)); } else { #if defined(HAVE_OPENLOG_R)...
2019 Sep 06
2
[PATCH 1/1] log: do not print carriage return
...f-by: Christian Hesse <mail at eworm.de> --- log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log.c b/log.c index d9c2d136..7e0737c4 100644 --- a/log.c +++ b/log.c @@ -462,7 +462,7 @@ do_log(LogLevel level, const char *fmt, va_list args) tmp_handler(level, fmtbuf, log_handler_ctx); log_handler = tmp_handler; } else if (log_on_stderr) { - snprintf(msgbuf, sizeof msgbuf, "%.*s\r\n", + snprintf(msgbuf, sizeof msgbuf, "%.*s\n", (int)sizeof msgbuf - 3, fmtbuf); (void)write(log_stderr_fd, msgbuf, strlen(msgbuf)); } else {
2015 Jul 06
2
[PATCH 1/1] paint visual host key with unicode box-drawing characters
Le 06/07/15 12:33, Alex Bligh a ?crit : > On 6 Jul 2015, at 11:05, Christian Hesse <list at eworm.de> wrote: > >> +#ifdef HAVE_LOCALE_H >> + char *locale; >> + char *border_utf8[] = { "?", "?", "?", "?", "?", "?" }; >> +#endif >> + char *border_ascii[] = { "+", "-",
2015 Jul 06
7
[PATCH 1/1] paint visual host key with unicode box-drawing characters
From: Christian Hesse <mail at eworm.de> Signed-off-by: Christian Hesse <mail at eworm.de> --- sshkey.c | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/sshkey.c b/sshkey.c index cfe5980..47511c2 100644 --- a/sshkey.c +++ b/sshkey.c @@ -44,6 +44,9 @@ #include <stdio.h> #include <string.h> #include