[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/ricci/modules/cluster ClusterConf.cpp



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe 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

--- conga/ricci/modules/cluster/ClusterConf.cpp	2007/09/18 20:17:16	1.12
+++ conga/ricci/modules/cluster/ClusterConf.cpp	2007/10/23 14:56:54	1.13
@@ -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()) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]