mirror of git://anongit.mindrot.org/openssh.git
upstream: follow existing askpass logic for security key notifier:
fall back to _PATH_SSH_ASKPASS_DEFAULT if no $SSH_ASKPASS environment variable is set. OpenBSD-Commit-ID: cda753726b13fb797bf7a9f7a0b3022d9ade4520
This commit is contained in:
parent
575d0042a9
commit
018e2902a6
|
@ -1,4 +1,4 @@
|
||||||
/* $OpenBSD: readpass.c,v 1.56 2019/11/12 22:35:02 djm Exp $ */
|
/* $OpenBSD: readpass.c,v 1.57 2019/11/15 00:32:40 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -228,8 +228,9 @@ notify_start(int force_askpass, const char *fmt, ...)
|
||||||
free(prompt);
|
free(prompt);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (getenv("DISPLAY") == NULL ||
|
if ((askpass = getenv("SSH_ASKPASS")) == NULL)
|
||||||
(askpass = getenv("SSH_ASKPASS")) == NULL || *askpass == '\0') {
|
askpass = _PATH_SSH_ASKPASS_DEFAULT;
|
||||||
|
if (getenv("DISPLAY") == NULL || *askpass == '\0') {
|
||||||
debug3("%s: cannot notify", __func__);
|
debug3("%s: cannot notify", __func__);
|
||||||
free(prompt);
|
free(prompt);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue