mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
virt-manager: Set SSH_ASKPASS_REQUIRE=force
openssh 8.4p1 released in Sep 2020 finally added a feature to force using SSH_ASKPASS instead of prompting on the commandline for password, if a password would be required. https://man.openbsd.org/ssh.1#SSH_ASKPASS_REQUIRE Getting this behavior is basically what our whole fork dance is about. Now we can do it with an environment variable Let the user override it from the environment though, so there's an escape hatch incase this causes unforseen problems Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
6c9842a158
commit
17e39de021
@ -185,6 +185,12 @@ def main():
|
|||||||
# With F27 gnome+wayland we need to set these before GTK import
|
# With F27 gnome+wayland we need to set these before GTK import
|
||||||
os.environ["GSETTINGS_SCHEMA_DIR"] = BuildConfig.gsettings_dir
|
os.environ["GSETTINGS_SCHEMA_DIR"] = BuildConfig.gsettings_dir
|
||||||
|
|
||||||
|
# Force SSH to use askpass if a password is required,
|
||||||
|
# rather than possibly prompting on a terminal the user isn't looking at.
|
||||||
|
os.environ.setdefault("SSH_ASKPASS_REQUIRE", "force")
|
||||||
|
log.debug("Using SSH_ASKPASS_REQUIRE=%s",
|
||||||
|
os.environ["SSH_ASKPASS_REQUIRE"])
|
||||||
|
|
||||||
# Now we've got basic environment up & running we can fork
|
# Now we've got basic environment up & running we can fork
|
||||||
do_drop_stdio = False
|
do_drop_stdio = False
|
||||||
if not options.no_fork and not options.debug:
|
if not options.no_fork and not options.debug:
|
||||||
|
Loading…
Reference in New Issue
Block a user