]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
open the tmp keypath with 0600 permissions
authorAlfredo Deza <adeza@redhat.com>
Mon, 13 Apr 2015 16:00:18 +0000 (12:00 -0400)
committerTravis Rhoden <trhoden@redhat.com>
Thu, 16 Apr 2015 16:36:05 +0000 (12:36 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 8ffc0eb85fea5a02b476a940e60a54f83478e5a1)

ceph_deploy/new.py

index a4dfb5765c75745f29e60d552e33a8904f98f3cd..a599fccd39bed71e6b5ac457e1f063d8d9a6e5ee 100644 (file)
@@ -215,7 +215,7 @@ def new_mon_keyring(args):
     LOG.debug('Writing monitor keyring to %s...', keypath)
     try:
         tmp = '%s.tmp' % keypath
-        with file(tmp, 'w') as f:
+        with file(tmp, 'w', 0600) as f:
             f.write(mon_keyring)
         try:
             os.rename(tmp, keypath)