search for: log_on_stderr

Displaying 12 results from an estimated 12 matches for "log_on_stderr".

2011 Jun 02
2
preauth privsep logging via monitor
...================================================================== RCS file: /var/cvs/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_...
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) && defined(SYSLOG_DATA_INIT) diff --git a/sshkey.c b/ss...
2000 Oct 30
2
Minor fixes for openssh-SNAP-20001028
...,7 +46,7 @@ #ifdef HAVE___PROGNAME extern char *__progname; #else /* HAVE___PROGNAME */ -static const char *__progname = "sshd"; +static const char *__progname = NULL; #endif /* HAVE___PROGNAME */ static LogLevel log_level = SYSLOG_LEVEL_INFO; @@ -118,6 +118,10 @@ exit(1); } log_on_stderr = on_stderr; + if (__progname == NULL) + __progname = av0; + if (! log_on_stderr) + openlog(__progname, LOG_PID, log_facility); } #define MSGBUFSIZ 1024
2001 Jul 05
1
OpenSSH Logging Madness
...*/ void +notice(const char *fmt,...) +{ + va_list args; + va_start(args, fmt); + do_log(SYSLOG_LEVEL_NOTICE, fmt, args); + va_end(args); +} + +/* Log this message (information that usually should go to the log). */ + +void log(const char *fmt,...) { va_list args; @@ -347,6 +358,9 @@ if (!log_on_stderr) txt = "error"; pri = LOG_ERR; + break; + case SYSLOG_LEVEL_NOTICE: + pri = LOG_NOTICE; break; case SYSLOG_LEVEL_INFO: pri = LOG_INFO; ******************************************************************************** -DISCLAIMER: an automatically appended disclaimer may fo...
2016 Jul 07
2
portable sftp oddity: sftp, redirection of stderr and ControPersist
hi, Ran into a problem which I thought was an AIXism, but have since found that it can be reproduced on Linux and MacOS. It can NOT be reproduced on OpenBSD. Reproduced on: AIXv7.1 OpenSSH v6.0p1 RedHat 6.8 OpenSSH 5.4p1 Redhat 7.2 OpenSSH 6.6.1p1 MacOS 10.11 (sorry, forgot to grab the OpenSSH version) Could not reproduce on: OpenBSD 5.9-current, march snapshot, OpenSSH_7.2 OpenBSD
2019 Sep 06
2
[PATCH 1/1] log: do not print carriage return
...+- 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 {
2017 Feb 13
3
Logfile encoding question
Hello. I've got a question about encoding in sshd's log files. When I try to log in with a "?" username, which is a cyrillic "h" (U+0445), I get this message in a logfile: input_userauth_request: invalid user \\321\\205 [preauth]. I am struggling to understand: is that hex, is that octal? It doesn't map to any encoding that I know of.
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[] = { "+", "-",
2000 Jan 18
0
More NetBSD patches
...) return; Index: log-server.c =================================================================== RCS file: /usr/local/cvs/openssh/log-server.c,v retrieving revision 1.4 diff -u -r1.4 log-server.c --- log-server.c 2000/01/17 16:53:10 1.4 +++ log-server.c 2000/01/18 15:22:24 @@ -97,13 +97,13 @@ log_on_stderr = on_stderr; } -#define MSGBUFSIZE 1024 +#define SSH_MSGBUFSIZE 1024 void do_log(LogLevel level, const char *fmt, va_list args) { - char msgbuf[MSGBUFSIZE]; - char fmtbuf[MSGBUFSIZE]; + char msgbuf[SSH_MSGBUFSIZE]; + char fmtbuf[SSH_MSGBUFSIZE]; char *txt = NULL; int pri = LOG_INFO; I...
2002 Dec 18
2
patch for openssh3.5p1 - adds logging option
...p1/log.c --- openssh-3.5p1-orig/log.c 2002-12-18 10:10:13.000000000 -0500 +++ openssh-3.5p1/log.c 2002-12-18 11:51:24.000000000 -0500 @@ -40,6 +40,7 @@ #include "xmalloc.h" #include <syslog.h> +#include <time.h> static LogLevel log_level = SYSLOG_LEVEL_INFO; static int log_on_stderr = 1; @@ -48,6 +49,8 @@ extern char *__progname; +FILE *logf; + /* textual representation of log-facilities/levels */ static struct { @@ -261,7 +264,8 @@ */ void -log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr) +log_init(char *av0, LogLevel level, SyslogFaci...
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