summaryrefslogtreecommitdiffstats
path: root/monitor_wrap.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2021-04-15 18:24:31 +0200
committerDamien Miller <djm@mindrot.org>2021-04-16 05:24:33 +0200
commitfaf2b86a46c9281d237bcdec18c99e94a4eb820a (patch)
tree31f662f8992fcde2c429d3cb6619f0be6349ae27 /monitor_wrap.c
parentsshd don't exit on transient read errors (diff)
downloadopenssh-faf2b86a46c9281d237bcdec18c99e94a4eb820a.tar.xz
openssh-faf2b86a46c9281d237bcdec18c99e94a4eb820a.zip
upstream: do not pass file/func to monitor; noted by Ilja van Sprundel;
ok djm@ OpenBSD-Commit-ID: 85ae5c063845c410283cbdce685515dcd19479fa
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r--monitor_wrap.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 1226dfd0e..748333c75 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_wrap.c,v 1.122 2020/11/27 00:37:10 djm Exp $ */
+/* $OpenBSD: monitor_wrap.c,v 1.123 2021/04/15 16:24:31 markus Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -82,8 +82,7 @@ extern struct sshbuf *loginmsg;
extern ServerOptions options;
void
-mm_log_handler(const char *file, const char *func, int line,
- LogLevel level, const char *msg, void *ctx)
+mm_log_handler(LogLevel level, int forced, const char *msg, void *ctx)
{
struct sshbuf *log_msg;
struct monitor *mon = (struct monitor *)ctx;
@@ -97,10 +96,8 @@ mm_log_handler(const char *file, const char *func, int line,
fatal_f("sshbuf_new failed");
if ((r = sshbuf_put_u32(log_msg, 0)) != 0 || /* length; filled below */
- (r = sshbuf_put_cstring(log_msg, file)) != 0 ||
- (r = sshbuf_put_cstring(log_msg, func)) != 0 ||
- (r = sshbuf_put_u32(log_msg, (u_int)line)) != 0 ||
(r = sshbuf_put_u32(log_msg, level)) != 0 ||
+ (r = sshbuf_put_u32(log_msg, forced)) != 0 ||
(r = sshbuf_put_cstring(log_msg, msg)) != 0)
fatal_fr(r, "assemble");
if ((len = sshbuf_len(log_msg)) < 4 || len > 0xffffffff)