search for: syslog_data_init

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

2016 Mar 28
2
Is it possible to extend log message?
...nst char *logfile) log_stderr_fd = fd; } -#define MSGBUFSIZ 1024 +#define MSGBUFSIZ 5192 void set_log_handler(log_handler_fn *handler, void *ctx) @@ -448,11 +448,11 @@ do_log(LogLevel level, const char *fmt, va_list args) } else { #if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT) openlog_r(argv0 ? argv0 : __progname, LOG_PID, log_facility, &sd - syslog_r(pri, &sdata, "%.500s", fmtbuf); + syslog_r(pri, &sdata, "%s", fmtbuf); closelog_r(&sdata); #else openlog(argv...
2015 Jul 06
3
[PATCH v2 1/1] paint visual host key with unicode box-drawing characters
...er = 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) && defined(SYSLOG_DATA_INIT) diff --git a/sshkey.c b/sshkey.c index cfe5980..326bc29 100644 --- a/sshkey.c +++ b/sshkey.c @@ -44,6 +44,9 @@ #include <stdio.h> #include <string.h> #include <resolv.h> +#ifdef HAVE_LOCALE_H +#include <locale.h> +#endif /* HAVE_LOCALE_H */ #ifdef HAVE_UTIL_H #include...
2003 Sep 16
1
[Bug 642] Can't build build OpenSSH 3.7 on OpenBSD 3.0
..." step at: cc -O2 -I/usr/src/usr.bin/ssh/lib/.. -c /usr/src/usr.bin/ssh/lib/../log.c -o log.o /usr/src/usr.bin/ssh/lib/../log.c: In function `do_log': /usr/src/usr.bin/ssh/lib/../log.c:335: variable `sdata' has initializer but incomplete type /usr/src/usr.bin/ssh/lib/../log.c:335: `SYSLOG_DATA_INIT' undeclared (first use in this function) /usr/src/usr.bin/ssh/lib/../log.c:335: (Each undeclared identifier is reported only once /usr/src/usr.bin/ssh/lib/../log.c:335: for each function it appears in.) /usr/src/usr.bin/ssh/lib/../log.c:335: storage size of `sdata' isn't known *** Error...
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[] = { "+", "-",
2011 Jun 02
2
preauth privsep logging via monitor
...r = handler; + log_handler_ctx = ctx; +} + +void +do_log2(LogLevel level, const char *fmt,...) +{ + va_list args; + + va_start(args, fmt); + do_log(level, fmt, args); + va_end(args); +} + +void do_log(LogLevel level, const char *fmt, va_list args) { #if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT) @@ -337,6 +359,7 @@ do_log(LogLevel level, const char *fmt, char *txt = NULL; int pri = LOG_INFO; int saved_errno = errno; + log_handler_fn *tmp_handler; if (level > log_level) return; @@ -375,7 +398,7 @@ do_log(LogLevel level, const char *fmt, pri = LOG_ERR; break; } - i...
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