conga/ricci/modules/cluster ClusterConf.cpp
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-10-23 14:56:55
Modified files:
ricci/modules/cluster: ClusterConf.cpp
Log message:
Set mode 0640 on cluster.conf, not 0600
ricci/modules/cluster/ClusterConf.cpp +2 -1
@@ -78,7 +78,7 @@ throw String("opendir() error: ") + String(strerror(errno)); } - mode_t old_umask = umask(0077); + mode_t old_umask = umask(0027); int conf_fd = mkstemp(cconf_path); err = errno; umask(old_umask);
@@ -91,6 +91,7 @@ String conf_xml(generateXML(xml)); ssize_t ret = write(conf_fd, conf_xml.c_str(), conf_xml.size()); err = errno; + fchmod(conf_fd, 0640); close(conf_fd); if (ret != (ssize_t) conf_xml.size()) {