mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
integration tests OpenSSHTransport: Expand tilde to home in root_ssh_key_filename
Expand paths beginning with a tilde, such as the default ~/.ssh/id_rsa, to the home directory. https://fedorahosted.org/freeipa/ticket/4115
This commit is contained in:
@@ -284,7 +284,8 @@ class OpenSSHTransport(Transport):
|
|||||||
'-o', 'UserKnownHostsFile=%s' % known_hosts_file]
|
'-o', 'UserKnownHostsFile=%s' % known_hosts_file]
|
||||||
|
|
||||||
if self.host.root_ssh_key_filename:
|
if self.host.root_ssh_key_filename:
|
||||||
argv.extend(['-i', self.host.root_ssh_key_filename])
|
key_filename = os.path.expanduser(self.host.root_ssh_key_filename)
|
||||||
|
argv.extend(['-i', key_filename])
|
||||||
elif self.host.root_password:
|
elif self.host.root_password:
|
||||||
self.log.critical('Password authentication not supported')
|
self.log.critical('Password authentication not supported')
|
||||||
raise RuntimeError('Password authentication not supported')
|
raise RuntimeError('Password authentication not supported')
|
||||||
|
|||||||
Reference in New Issue
Block a user