mirror of
https://github.com/openssh/openssh-portable.git
synced 2026-01-12 00:04:08 +08:00
upstream: don't strnvis() log messages that are going to be logged
by sshd-auth via its parent sshd-session process, as the parent will also run them though strnvis(). Prevents double-escaping of non-printing characters in some log messages. bz3896 ok dtucker@ OpenBSD-Commit-ID: d78faad96a98af5269d66ddceee553cf7d396dfe
This commit is contained in:
committed by
Damien Miller
parent
bad220decb
commit
e4cc5ab0ef
5
log.c
5
log.c
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: log.c,v 1.65 2025/09/02 09:34:48 djm Exp $ */
|
||||
/* $OpenBSD: log.c,v 1.66 2025/11/17 05:24:42 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@@ -403,7 +403,8 @@ do_log(LogLevel level, int force, const char *suffix, const char *fmt,
|
||||
/* Avoid recursion */
|
||||
tmp_handler = log_handler;
|
||||
log_handler = NULL;
|
||||
tmp_handler(level, force, fmtbuf, log_handler_ctx);
|
||||
/* Note: this sends the raw (i.e. no strnvis) log message */
|
||||
tmp_handler(level, force, msgbuf, log_handler_ctx);
|
||||
log_handler = tmp_handler;
|
||||
} else if (log_on_stderr) {
|
||||
snprintf(msgbuf, sizeof msgbuf, "%s%s%.*s\r\n",
|
||||
|
||||
Reference in New Issue
Block a user