SHA256
1
0
forked from pool/salt
salt/set-passphrase-for-salt-ssh-keys-to-empty-string-293.patch

32 lines
1007 B
Diff

From 677b7a8881a2e9ebab58cead29b1a6d83850c888 Mon Sep 17 00:00:00 2001
From: Alexander Graul <mail@agraul.de>
Date: Thu, 5 Nov 2020 16:54:44 +0100
Subject: [PATCH] Set passphrase for salt-ssh keys to empty string
(#293)
Since the cmd is not passed to a shell anymore, the "" are taken
literally and not as an empty string.
Bugzilla report: https://bugzilla.suse.com/show_bug.cgi?id=1178485
---
salt/client/ssh/shell.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/salt/client/ssh/shell.py b/salt/client/ssh/shell.py
index 27aba7b382..27ab9f4f1b 100644
--- a/salt/client/ssh/shell.py
+++ b/salt/client/ssh/shell.py
@@ -44,7 +44,7 @@ def gen_key(path):
'''
Generate a key for use with salt-ssh
'''
- cmd = ["ssh-keygen", "-P", '""', "-f", path, "-t", "rsa", "-q"]
+ cmd = ["ssh-keygen", "-P", "", "-f", path, "-t", "rsa", "-q"]
if not os.path.isdir(os.path.dirname(path)):
os.makedirs(os.path.dirname(path))
subprocess.call(cmd)
--
2.28.0