summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/backend/utils.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-08-15 10:32:37 -0300
committerTomás Touceda <chiiph@leap.se>2014-08-15 10:32:37 -0300
commite8c028f3eb6cd0681f039c456dc1ac45c98d598f (patch)
treeb7e84ebafad106726308d3c87f58ad1d900d66d7 /src/leap/bitmask/backend/utils.py
parent159dbe295148975bdfe9a50f871254aa9adf2328 (diff)
parentfb9bad95cc4bd2769af5f91c2f0cac1be4c3c617 (diff)
Merge branch 'release-0.6.1'0.6.1
Diffstat (limited to 'src/leap/bitmask/backend/utils.py')
-rw-r--r--src/leap/bitmask/backend/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/leap/bitmask/backend/utils.py b/src/leap/bitmask/backend/utils.py
index 54a16fd7..65bf6753 100644
--- a/src/leap/bitmask/backend/utils.py
+++ b/src/leap/bitmask/backend/utils.py
@@ -19,6 +19,7 @@ Backend utilities to handle ZMQ certificates.
"""
import os
import shutil
+import stat
import zmq.auth
@@ -36,6 +37,8 @@ def generate_certificates():
if os.path.exists(KEYS_DIR):
shutil.rmtree(KEYS_DIR)
mkdir_p(KEYS_DIR)
+ # set permissions to: 0700 (U:rwx G:--- O:---)
+ os.chmod(KEYS_DIR, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
# create new keys in certificates dir
# public_file, secret_file = create_certificates(...)