cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] conga/ricci/modules/cluster ClusterConf.cpp
@ 2006-12-10 18:58 rmccabe
  0 siblings, 0 replies; 4+ messages in thread
From: rmccabe @ 2006-12-10 18:58 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2006-12-10 18:58:46

Modified files:
	ricci/modules/cluster: ClusterConf.cpp 

Log message:
	close the output fd to make sure the data is flushed to disk before attempting to run ccs_tool

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

--- conga/ricci/modules/cluster/ClusterConf.cpp	2006/10/06 03:10:13	1.8
+++ conga/ricci/modules/cluster/ClusterConf.cpp	2006/12/10 18:58:46	1.9
@@ -85,6 +85,7 @@
   fstream fs(tmp_path.c_str(), 
 	     ios_base::out | ios_base::trunc);
   fs << generateXML(xml);
+  fs.close();
   
   // propagate/move to proper place
   if (propagate) {



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cluster-devel] conga/ricci/modules/cluster ClusterConf.cpp
@ 2007-10-23 14:52 rmccabe
  0 siblings, 0 replies; 4+ messages in thread
From: rmccabe @ 2007-10-23 14:52 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL4
Changes by:	rmccabe at sourceware.org	2007-10-23 14:52:32

Modified files:
	ricci/modules/cluster: ClusterConf.cpp 

Log message:
	explicitly chmod temp cluster.conf files to 0640

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

--- conga/ricci/modules/cluster/ClusterConf.cpp	2006/12/10 18:58:46	1.9
+++ conga/ricci/modules/cluster/ClusterConf.cpp	2007/10/23 14:52:32	1.9.2.1
@@ -82,8 +82,8 @@
   
   // save tmp cluster.conf
   String tmp_path(CLUSTER_CONF_PATH + ".tmp_ricci");
-  fstream fs(tmp_path.c_str(), 
-	     ios_base::out | ios_base::trunc);
+  fstream fs(tmp_path.c_str(), ios_base::out | ios_base::trunc);
+  chmod(tmp_path.c_str(), 0640);
   fs << generateXML(xml);
   fs.close();
   



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cluster-devel] conga/ricci/modules/cluster ClusterConf.cpp
@ 2007-10-23 14:56 rmccabe
  0 siblings, 0 replies; 4+ messages in thread
From: rmccabe @ 2007-10-23 14:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cluster-devel] conga/ricci/modules/cluster ClusterConf.cpp
@ 2007-10-23 14:58 rmccabe
  0 siblings, 0 replies; 4+ messages in thread
From: rmccabe @ 2007-10-23 14:58 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe at sourceware.org	2007-10-23 14:58:53

Modified files:
	ricci/modules/cluster: ClusterConf.cpp 

Log message:
	Explicitly chmod temp cluster.conf files to 0640

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

--- conga/ricci/modules/cluster/ClusterConf.cpp	2006/12/11 23:58:01	1.8.2.1
+++ conga/ricci/modules/cluster/ClusterConf.cpp	2007/10/23 14:58:53	1.8.2.2
@@ -82,9 +82,9 @@
   
   // save tmp cluster.conf
   String tmp_path(CLUSTER_CONF_PATH + ".tmp_ricci");
-  fstream fs(tmp_path.c_str(), 
-	     ios_base::out | ios_base::trunc);
+  fstream fs(tmp_path.c_str(), ios_base::out | ios_base::trunc);
   fs << generateXML(xml);
+  chmod(tmp_path.c_str(), 0640);
   fs.close();
   
   // propagate/move to proper place



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-10-23 14:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 14:58 [Cluster-devel] conga/ricci/modules/cluster ClusterConf.cpp rmccabe
  -- strict thread matches above, loose matches on Subject: below --
2007-10-23 14:56 rmccabe
2007-10-23 14:52 rmccabe
2006-12-10 18:58 rmccabe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).