https://fedorahosted.org/freeipa/ticket/4115

The tilde was not expanded in the $IPA_ROOT_SSH_KEY configuration variable, so the default (~/.ssh/id_rsa) did not work.
Here's a fix.

--
PetrĀ³
From 78164b1a6f9fd5d247511d664f616697fef1d1ca Mon Sep 17 00:00:00 2001
From: Petr Viktorin <pvikt...@redhat.com>
Date: Tue, 14 Jan 2014 17:16:12 +0100
Subject: [PATCH] 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
---
 ipatests/test_integration/transport.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ipatests/test_integration/transport.py b/ipatests/test_integration/transport.py
index 85c022221ff32ff24ba55dc0171b74f3307cd964..066feaef654b02fddadf7090968200cb85761fa7 100644
--- a/ipatests/test_integration/transport.py
+++ b/ipatests/test_integration/transport.py
@@ -284,7 +284,8 @@ def _get_ssh_argv(self):
                 '-o', 'UserKnownHostsFile=%s' % known_hosts_file]
 
         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:
             self.log.critical('Password authentication not supported')
             raise RuntimeError('Password authentication not supported')
-- 
1.8.4.2

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to