=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/readpass.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- src/usr.bin/ssh/readpass.c 2022/05/27 04:27:49 1.70 +++ src/usr.bin/ssh/readpass.c 2024/03/30 04:27:44 1.71 @@ -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. * @@ -124,8 +124,9 @@ 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; @@ -258,7 +259,7 @@ 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");