From: Alfredo Deza Date: Mon, 13 Apr 2015 16:00:18 +0000 (-0400) Subject: open the tmp keypath with 0600 permissions X-Git-Tag: v1.5.22.1~1^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=022e28e32322eff80c8a81c6bb34265a501cfbe8;p=ceph-deploy.git open the tmp keypath with 0600 permissions Signed-off-by: Alfredo Deza (cherry picked from commit 8ffc0eb85fea5a02b476a940e60a54f83478e5a1) --- diff --git a/ceph_deploy/new.py b/ceph_deploy/new.py index a4dfb57..a599fcc 100644 --- a/ceph_deploy/new.py +++ b/ceph_deploy/new.py @@ -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)