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

[Cluster-devel] cluster/rgmanager/src/daemons resrules.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	mgrac sourceware org	2006-08-31 12:00:14

Modified files:
	rgmanager/src/daemons: resrules.c 

Log message:
	Fix #203720. Do not run backup copies (ends with ~) of resource agents.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/resrules.c.diff?cvsroot=cluster&r1=1.13&r2=1.14

--- cluster/rgmanager/src/daemons/resrules.c	2006/07/19 18:43:32	1.13
+++ cluster/rgmanager/src/daemons/resrules.c	2006/08/31 12:00:13	1.14
@@ -22,6 +22,7 @@
 #include <ccs.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <resgroup.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -954,6 +955,10 @@
 		fn = basename(de->d_name);
 		if (!fn)
 			continue;
+		
+		if ((fn != NULL) && (strlen(fn) > 0) && 
+			(fn[strlen(fn)-1] == '~')) 
+			continue;
 
 		snprintf(path, sizeof(path), "%s/%s",
 			 rpath, de->d_name);


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