Skip to contentSkip to conversation

conga/ricci/modules/cluster ClusterConf.cpp

Cluster-devel [email protected] 1 participant 1 message Oct 23, 2007

lore
Share & tools
lore
#0 lore raw

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

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/ClusterConf.cpp.diff?cvsroot=cluster&r1=1.12&r2=1.13

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()) {