[Cluster-devel] conga/ricci/modules/storage GFS1.cpp GFS2.cpp ...

kupcevic at sourceware.org kupcevic at sourceware.org
Tue Mar 20 15:36:00 UTC 2007


CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	kupcevic at sourceware.org	2007-03-20 15:36:00

Modified files:
	ricci/modules/storage: GFS1.cpp GFS2.cpp VG.cpp defines.h 

Log message:
	storage module: prevent usage of illegal characters for naming

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/GFS1.cpp.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/GFS2.cpp.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/VG.cpp.diff?cvsroot=cluster&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/defines.h.diff?cvsroot=cluster&r1=1.6&r2=1.7

--- conga/ricci/modules/storage/GFS1.cpp	2006/10/06 03:10:13	1.3
+++ conga/ricci/modules/storage/GFS1.cpp	2007/03/20 15:35:59	1.4
@@ -264,7 +264,7 @@
 		    name,
 		    1,
 		    16,
-		    String(" ;!@#$%^& *()+=/\\|?><,.\"':;"),
+		    NAMES_ILLEGAL_CHARS, 
 		    list<String>());
   name_var.set_conditional_bool_if("clustered");
   _props.set(name_var);
--- conga/ricci/modules/storage/GFS2.cpp	2007/03/01 00:13:12	1.4
+++ conga/ricci/modules/storage/GFS2.cpp	2007/03/20 15:35:59	1.5
@@ -252,7 +252,7 @@
 		    name,
 		    1,
 		    16,
-		    String(" ;!@#$%^&*()+=/\\|?><,.\"':;"),
+		    NAMES_ILLEGAL_CHARS, 
 		    list<String>());
   name_var.set_conditional_bool_if("clustered");
   _props.set(name_var);
--- conga/ricci/modules/storage/VG.cpp	2007/03/05 20:45:17	1.10
+++ conga/ricci/modules/storage/VG.cpp	2007/03/20 15:35:59	1.11
@@ -28,7 +28,7 @@
 #include "defines.h"
 #include "utils.h"
 #include "MidAir.h"
-#include "LVMClusterLockingError.h";
+#include "LVMClusterLockingError.h"
 
 #include "Time.h"
 
@@ -149,11 +149,13 @@
       String lvname = (*iter)->_props.get("lvname").get_string();
       lvnames.push_back(lvname);
     }
+    lvnames.push_back("_mlog");
+    lvnames.push_back("_mimage");
     new_lv->props.set(Variable("lvname", 
 			       String("new_lv"), 
 			       1,
 			       36,
-			       "-?/$%!",
+			       NAMES_ILLEGAL_CHARS, 
 			       lvnames));
     
     new_lv->props.set(Variable("vgname", _vgname));
@@ -168,7 +170,7 @@
 				 String("new_snapshot"), 
 				 1,
 				 36,
-				 "-?/$%!",
+				 NAMES_ILLEGAL_CHARS, 
 				 lvnames));
     
     new_snap->content->_avail_replacements.clear();
@@ -337,7 +339,7 @@
 		  String("new_vg"), 
 		  1,
 		  36,
-		  "-?/$%#",
+		  NAMES_ILLEGAL_CHARS, 
 		  vgnames);
   props.set(vgname);
   
--- conga/ricci/modules/storage/defines.h	2006/09/26 03:02:57	1.6
+++ conga/ricci/modules/storage/defines.h	2007/03/20 15:35:59	1.7
@@ -1,5 +1,5 @@
 /*
-  Copyright Red Hat, Inc. 2005
+  Copyright Red Hat, Inc. 2005-2007
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
@@ -100,6 +100,8 @@
 #define FUNC_RESPONSE_TAG   String("function_response")
 
 
+const static String NAMES_ILLEGAL_CHARS("~`!@#$%^&*()+=[]{}|\\:;\"'<>?");
+
 
 
 #endif  // defines_h




More information about the Cluster-devel mailing list