]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Fix x11_channel_used_recently() to return true when channel
authordtucker@openbsd.org <dtucker@openbsd.org>
Mon, 2 Jun 2025 14:09:34 +0000 (14:09 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Mon, 2 Jun 2025 14:32:30 +0000 (00:32 +1000)
has been used within the last second, instead of more than a second ago.
Should fix ~5s delay on X client startup when ObscureKeystrokeTiming is
enabled. bz#3820, ok (& sigh) djm@

OpenBSD-Commit-ID: b741011e81fb3e3d42711d9bd3ed8a959924dee4

channels.c

index f71f82466f2f6dd0e995e9aa7ac7736bb9cc7829..0efbd8d174c7d838f70705006c953ec611d9bcc8 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.445 2025/05/29 13:27:27 dtucker Exp $ */
+/* $OpenBSD: channels.c,v 1.446 2025/06/02 14:09:34 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -5356,5 +5356,5 @@ x11_channel_used_recently(struct ssh *ssh) {
                if (c->lastused > lastused)
                        lastused = c->lastused;
        }
-       return lastused != 0 && monotime() > lastused + 1;
+       return lastused != 0 && monotime() <= lastused + 1;
 }