|
1 | | -/* $OpenBSD: channels.c,v 1.451 2025/09/25 06:33:19 djm Exp $ */ |
| 1 | +/* $OpenBSD: channels.c,v 1.452 2025/10/07 08:02:32 djm Exp $ */ |
2 | 2 | /* |
3 | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -362,7 +362,7 @@ channel_classify(struct ssh *ssh, Channel *c) |
362 | 362 | { |
363 | 363 | struct ssh_channels *sc = ssh->chanctxt; |
364 | 364 | const char *type = c->xctype == NULL ? c->ctype : c->xctype; |
365 | | - const char *classifier = c->isatty ? |
| 365 | + const char *classifier = (c->isatty || c->remote_has_tty) ? |
366 | 366 | sc->bulk_classifier_tty : sc->bulk_classifier_notty; |
367 | 367 |
|
368 | 368 | c->bulk = type != NULL && match_pattern_list(type, classifier, 0) == 1; |
@@ -566,7 +566,7 @@ channel_new(struct ssh *ssh, char *ctype, int type, int rfd, int wfd, int efd, |
566 | 566 | void |
567 | 567 | channel_set_tty(struct ssh *ssh, Channel *c) |
568 | 568 | { |
569 | | - c->isatty = 1; |
| 569 | + c->remote_has_tty = 1; |
570 | 570 | channel_classify(ssh, c); |
571 | 571 | } |
572 | 572 |
|
@@ -1078,7 +1078,8 @@ channel_format_status(const Channel *c) |
1078 | 1078 | c->rfd, c->wfd, c->efd, c->sock, c->ctl_chan, |
1079 | 1079 | c->have_ctl_child_id ? "c" : "nc", c->ctl_child_id, |
1080 | 1080 | c->io_want, c->io_ready, |
1081 | | - c->isatty ? "T" : "", c->bulk ? "B" : "I"); |
| 1081 | + c->isatty ? "T" : (c->remote_has_tty ? "RT" : ""), |
| 1082 | + c->bulk ? "B" : "I"); |
1082 | 1083 | return ret; |
1083 | 1084 | } |
1084 | 1085 |
|
|
0 commit comments