Commit cd57bab6 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

ensure-dirs: Set correct permissions on ssconf files



The files should be 0444, not 0400. This was a regression from 2.4.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 66a66fa7
......@@ -1240,6 +1240,8 @@ SS_MAINTAIN_NODE_HEALTH = "maintain_node_health"
SS_UID_POOL = "uid_pool"
SS_NODEGROUPS = "nodegroups"
SS_FILE_PERMS = 0444
# cluster wide default parameters
DEFAULT_ENABLED_HYPERVISOR = HT_XEN_PVM
......
......@@ -349,7 +349,8 @@ class SimpleStore(object):
if len(value) > self._MAX_SIZE:
raise errors.ConfigurationError("ssconf file %s above maximum size" %
name)
utils.WriteFile(self.KeyToFilename(name), data=value, mode=0444)
utils.WriteFile(self.KeyToFilename(name), data=value,
mode=constants.SS_FILE_PERMS)
finally:
ssconf_lock.Unlock()
......
......@@ -172,7 +172,8 @@ def GetPaths():
ss = ssconf.SimpleStore()
for ss_path in ss.GetFileList():
paths.append((ss_path, FILE, 0400, getent.noded_uid, 0, False))
paths.append((ss_path, FILE, constants.SS_FILE_PERMS,
getent.noded_uid, 0, False))
paths.extend([
(constants.QUEUE_DIR, DIR, 0700, getent.masterd_uid,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment