summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorChris Behrens <cbehrens@codestud.com>2011-05-24 22:25:40 +0000
committerTarmac <>2011-05-24 22:25:40 +0000
commit3f84a2dfb500a19f44db4c06f22c42e54ce7da2a (patch)
treeb61680992aff85e3c33fd08bd29f38825fffe0b3 /nova
parent781ed70a4035fe507e2e1e83dcd5262c81792b5a (diff)
parent0acbf6d77f02ca0fa3a11e29a55bbb617c33a816 (diff)
downloadnova-3f84a2dfb500a19f44db4c06f22c42e54ce7da2a.tar.gz
nova-3f84a2dfb500a19f44db4c06f22c42e54ce7da2a.tar.xz
nova-3f84a2dfb500a19f44db4c06f22c42e54ce7da2a.zip
Pretty simple. We call openssl to encrypt the admin password, but the recent changes around this code forgot to strip the newline off the read from stdout.
Diffstat (limited to 'nova')
-rw-r--r--nova/virt/xenapi/vmops.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py
index 0074444f8..45b04351d 100644
--- a/nova/virt/xenapi/vmops.py
+++ b/nova/virt/xenapi/vmops.py
@@ -1171,13 +1171,13 @@ class SimpleDH(object):
shared = self._shared
cmd = base_cmd % locals()
proc = _runproc(cmd)
- proc.stdin.write(text)
+ proc.stdin.write(text + '\n')
proc.stdin.close()
proc.wait()
err = proc.stderr.read()
if err:
raise RuntimeError(_('OpenSSL error: %s') % err)
- return proc.stdout.read()
+ return proc.stdout.read().strip('\n')
def encrypt(self, text):
return self._run_ssl(text, 'enc')