-/* $OpenBSD: channels.c,v 1.446 2025/06/02 14:09:34 dtucker Exp $ */
+/* $OpenBSD: channels.c,v 1.447 2025/08/18 03:28:02 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
return ret;
}
+void
+channel_report_open(struct ssh *ssh, int level)
+{
+ char *open, *oopen, *cp, ident[256];
+
+ sshpkt_fmt_connection_id(ssh, ident, sizeof(ident));
+ do_log2(level, "Connection: %s (pid %ld)", ident, (long)getpid());
+ open = oopen = channel_open_message(ssh);
+ while ((cp = strsep(&open, "\r\n")) != NULL) {
+ if (*cp != '\0')
+ do_log2(level, "%s", cp);
+ }
+ free(oopen);
+}
+
static void
open_preamble(struct ssh *ssh, const char *where, Channel *c, const char *type)
{
-/* $OpenBSD: channels.h,v 1.158 2024/10/13 22:20:06 djm Exp $ */
+/* $OpenBSD: channels.h,v 1.159 2025/08/18 03:28:02 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
int channel_tty_open(struct ssh *);
const char *channel_format_extended_usage(const Channel *);
char *channel_open_message(struct ssh *);
+void channel_report_open(struct ssh *, int);
int channel_find_open(struct ssh *);
/* tcp forwarding */