]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
keyring permissions for mon daemon 8049/head
authorOwen Synge <osynge@suse.com>
Wed, 2 Mar 2016 11:15:48 +0000 (12:15 +0100)
committerXiaoxi Chen <xiaoxchen@ebay.com>
Fri, 11 Mar 2016 16:00:29 +0000 (09:00 -0700)
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
(cherry picked from commit c2f91a8ce46974a72b960b7cb25af3d089fbb80d)

src/mon/Monitor.cc

index d62d7cf1e1cc4379f7745431a0d9807e182cd67a..53d3bcdeb94bf5c21325e2acc1b49a41af17383d 100644 (file)
@@ -4546,7 +4546,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()