[openssh-commits] [openssh] 01/02: upstream: When there's more than one x11 channel in use, return

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Jun 3 00:32:50 AEST 2025


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

dtucker pushed a commit to branch master
in repository openssh.

commit dc6c134b48ba4bcfadedcea17b4eddac329601d9
Author: dtucker at openbsd.org <dtucker at openbsd.org>
AuthorDate: Thu May 29 13:27:27 2025 +0000

    upstream: When there's more than one x11 channel in use, return
    
    lastused of most recently used x11 channel instead of the last one found. ok
    djm@
    
    OpenBSD-Commit-ID: 94a72bf988d40a5bae2e38608f4e117f712569fe
---
 channels.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/channels.c b/channels.c
index cd27faab2..f71f82466 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.444 2025/05/24 11:41:51 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.445 2025/05/29 13:27:27 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -5353,7 +5353,8 @@ x11_channel_used_recently(struct ssh *ssh) {
 		if (c == NULL || c->ctype == NULL || c->lastused == 0 ||
 		    strcmp(c->ctype, "x11-connection") != 0)
 			continue;
-		lastused = c->lastused;
+		if (c->lastused > lastused)
+			lastused = c->lastused;
 	}
 	return lastused != 0 && monotime() > lastused + 1;
 }

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


More information about the openssh-commits mailing list