[openssh-commits] [openssh] 02/03: upstream: add some logging to make debugging interactive/bulk

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Jun 24 17:24:43 AEST 2026


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 87e21b16d033700819a1381b9a2bfa2f8b3a217d
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Wed Jun 24 06:53:57 2026 +0000

    upstream: add some logging to make debugging interactive/bulk
    
    classification mistakes easier next time (though I think we've got them all
    now, really)
    
    OpenBSD-Commit-ID: 5fe3dd4e76ffba787a423e301095d55cf5b0f0dc
---
 channels.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/channels.c b/channels.c
index 237ab5639..5d0b8ca52 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.461 2026/06/01 05:40:13 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.462 2026/06/24 06:53:57 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -359,10 +359,14 @@ channel_classify(struct ssh *ssh, Channel *c)
 {
 	struct ssh_channels *sc = ssh->chanctxt;
 	const char *type = c->xctype == NULL ? c->ctype : c->xctype;
-	const char *classifier = (c->isatty || c->remote_has_tty) ?
+	const int has_tty = c->isatty || c->remote_has_tty;
+	const char *classifier = has_tty ?
 	    sc->bulk_classifier_tty : sc->bulk_classifier_notty;
 
 	c->bulk = type != NULL && match_pattern_list(type, classifier, 0) == 1;
+	debug3("channel %d: classify type \"%s\" (%s) as %s", c->self,
+	    type, has_tty ? "with TTY" : "no TTY",
+	    c->bulk ? "bulk" : "interactive");
 }
 
 /*

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list