[openssh-commits] [openssh] branch master updated: upstream: allow WAYLAND_DISPLAY to enable SSH_ASKPASS
git+noreply at mindrot.org
git+noreply at mindrot.org
Sat Mar 30 15:35:07 AEDT 2024
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
The following commit(s) were added to refs/heads/master by this push:
new 697359be upstream: allow WAYLAND_DISPLAY to enable SSH_ASKPASS
697359be is described below
commit 697359be9c23ee43618243cdbcc9c7981e766752
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Sat Mar 30 04:27:44 2024 +0000
upstream: allow WAYLAND_DISPLAY to enable SSH_ASKPASS
From dkg via GHPR479; ok dtucker@
OpenBSD-Commit-ID: 1ac1f9c45da44eabbae89375393c662349239257
---
readpass.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/readpass.c b/readpass.c
index b52f3d6b..d42b1185 100644
--- a/readpass.c
+++ b/readpass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readpass.c,v 1.70 2022/05/27 04:27:49 dtucker Exp $ */
+/* $OpenBSD: readpass.c,v 1.71 2024/03/30 04:27:44 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
*
@@ -127,8 +127,9 @@ read_passphrase(const char *prompt, int flags)
const char *askpass_hint = NULL;
const char *s;
- if ((s = getenv("DISPLAY")) != NULL)
- allow_askpass = *s != '\0';
+ if (((s = getenv("DISPLAY")) != NULL && *s != '\0') ||
+ ((s = getenv("WAYLAND_DISPLAY")) != NULL && *s != '\0'))
+ allow_askpass = 1;
if ((s = getenv(SSH_ASKPASS_REQUIRE_ENV)) != NULL) {
if (strcasecmp(s, "force") == 0) {
use_askpass = 1;
@@ -261,7 +262,7 @@ notify_start(int force_askpass, const char *fmt, ...)
debug3_f("cannot notify: no askpass");
goto out;
}
- if (getenv("DISPLAY") == NULL &&
+ if (getenv("DISPLAY") == NULL && getenv("WAYLAND_DISPLAY") == NULL &&
((s = getenv(SSH_ASKPASS_REQUIRE_ENV)) == NULL ||
strcmp(s, "force") != 0)) {
debug3_f("cannot notify: no display");
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list