]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
keyring permissions for mon daemon 7880/head
authorOwen Synge <osynge@suse.com>
Wed, 2 Mar 2016 11:15:48 +0000 (12:15 +0100)
committerOwen Synge <osynge@suse.com>
Wed, 2 Mar 2016 11:15:48 +0000 (12:15 +0100)
The command:

sudo ceph-mon --cluster ceph --mkfs -i $NODE_NAME --keyring $PATH_MON_KEYRING

Writes a new keyring with permissions set to "0644".

Fixes: #14950
Signed-off-by: Owen Synge osynge@suse.com
src/mon/Monitor.cc

index dcb129037b5ed3ab759ac74ee957ebcdea292223..2781c91cf6708e1ccf5c53b0b0f53af30231add8 100644 (file)
@@ -4943,7 +4943,7 @@ int Monitor::write_default_keyring(bufferlist& bl)
   os << g_conf->mon_data << "/keyring";
 
   int err = 0;
-  int fd = ::open(os.str().c_str(), O_WRONLY|O_CREAT, 0644);
+  int fd = ::open(os.str().c_str(), O_WRONLY|O_CREAT, 0600);
   if (fd < 0) {
     err = -errno;
     dout(0) << __func__ << " failed to open " << os.str()