Skip to content

Commit 4f6e4ea

Browse files
Michal Ruprichtridge
authored andcommitted
Do not clean DISPLAY unconditionally
1 parent 567c409 commit 4f6e4ea

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,9 @@ int main(int argc,char *argv[])
17431743
our_gid = MY_GID();
17441744
am_root = our_uid == ROOT_UID;
17451745

1746-
unset_env_var("DISPLAY");
1746+
// DISPLAY should not be emptied unconditionally
1747+
if (!getenv("SSH_ASKPASS"))
1748+
unset_env_var("DISPLAY");
17471749

17481750
#if defined USE_OPENSSL && defined SET_OPENSSL_CONF
17491751
#define TO_STR2(x) #x

0 commit comments

Comments
 (0)