summaryrefslogtreecommitdiff
path: root/nova/crypto.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-12-21 10:43:35 +0000
committerGerrit Code Review <review@openstack.org>2012-12-21 10:43:35 +0000
commit3f1a70bdb1b2a7df7147f09e2b0b09dd1b49f3be (patch)
tree82d1d9eaf0163cb947c4c03147246b6427c3caf4 /nova/crypto.py
parenta359b644c1f28b9a2e24aecc9f6f8d6581354f0f (diff)
parenta8a6e2e82e4f108badaad599570848c5e10ae241 (diff)
downloadnova-3f1a70bdb1b2a7df7147f09e2b0b09dd1b49f3be.tar.gz
Merge "Makes sure to call crypto scripts with abspath"
Diffstat (limited to 'nova/crypto.py')
-rw-r--r--nova/crypto.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/nova/crypto.py b/nova/crypto.py
index b7caa1c6e9..807df8702a 100644
--- a/nova/crypto.py
+++ b/nova/crypto.py
@@ -108,9 +108,8 @@ def ensure_ca_filesystem():
"""Ensure the CA filesystem exists."""
ca_dir = ca_folder()
if not os.path.exists(ca_path()):
- genrootca_sh_path = os.path.join(os.path.dirname(__file__),
- 'CA',
- 'genrootca.sh')
+ genrootca_sh_path = os.path.abspath(
+ os.path.join(os.path.dirname(__file__), 'CA', 'genrootca.sh'))
start = os.getcwd()
fileutils.ensure_tree(ca_dir)
@@ -251,9 +250,8 @@ def generate_x509_cert(user_id, project_id, bits=1024):
def _ensure_project_folder(project_id):
if not os.path.exists(ca_path(project_id)):
- geninter_sh_path = os.path.join(os.path.dirname(__file__),
- 'CA',
- 'geninter.sh')
+ geninter_sh_path = os.path.abspath(
+ os.path.join(os.path.dirname(__file__), 'CA', 'geninter.sh'))
start = os.getcwd()
os.chdir(ca_folder())
utils.execute('sh', geninter_sh_path, project_id,