diff options
Diffstat (limited to 'readpass.c')
-rw-r--r-- | readpass.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/readpass.c b/readpass.c index b3e799036..42cbe41f6 100644 --- a/readpass.c +++ b/readpass.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readpass.c,v 1.56 2019/11/12 22:35:02 djm Exp $ */ | 1 | /* $OpenBSD: readpass.c,v 1.57 2019/11/15 00:32:40 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -228,8 +228,9 @@ notify_start(int force_askpass, const char *fmt, ...) | |||
228 | free(prompt); | 228 | free(prompt); |
229 | return NULL; | 229 | return NULL; |
230 | } | 230 | } |
231 | if (getenv("DISPLAY") == NULL || | 231 | if ((askpass = getenv("SSH_ASKPASS")) == NULL) |
232 | (askpass = getenv("SSH_ASKPASS")) == NULL || *askpass == '\0') { | 232 | askpass = _PATH_SSH_ASKPASS_DEFAULT; |
233 | if (getenv("DISPLAY") == NULL || *askpass == '\0') { | ||
233 | debug3("%s: cannot notify", __func__); | 234 | debug3("%s: cannot notify", __func__); |
234 | free(prompt); | 235 | free(prompt); |
235 | return NULL; | 236 | return NULL; |