From mboxrd@z Thu Jan 1 00:00:00 1970 From: kupcevic@sourceware.org Date: 20 Mar 2007 15:49:33 -0000 Subject: [Cluster-devel] conga/ricci/modules/storage GFS1.cpp GFS2.cpp ... Message-ID: <20070320154933.4661.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Branch: RHEL4 Changes by: kupcevic at sourceware.org 2007-03-20 15:49:32 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&only_with_tag=RHEL4&r1=1.3&r2=1.3.4.1 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/GFS2.cpp.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3.4.1&r2=1.3.4.2 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/VG.cpp.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.9.2.1&r2=1.9.2.2 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/defines.h.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.6&r2=1.6.4.1 --- conga/ricci/modules/storage/GFS1.cpp 2006/10/06 03:10:13 1.3 +++ conga/ricci/modules/storage/GFS1.cpp 2007/03/20 15:49:32 1.3.4.1 @@ -264,7 +264,7 @@ name, 1, 16, - String(" ;!@#$%^& *()+=/\\|?><,.\"':;"), + NAMES_ILLEGAL_CHARS, list()); name_var.set_conditional_bool_if("clustered"); _props.set(name_var); --- conga/ricci/modules/storage/GFS2.cpp 2007/03/01 00:12:00 1.3.4.1 +++ conga/ricci/modules/storage/GFS2.cpp 2007/03/20 15:49:32 1.3.4.2 @@ -252,7 +252,7 @@ name, 1, 16, - String(" ;!@#$%^&*()+=/\\|?><,.\"':;"), + NAMES_ILLEGAL_CHARS, list()); name_var.set_conditional_bool_if("clustered"); _props.set(name_var); --- conga/ricci/modules/storage/VG.cpp 2007/03/05 20:22:36 1.9.2.1 +++ conga/ricci/modules/storage/VG.cpp 2007/03/20 15:49:32 1.9.2.2 @@ -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:49:32 1.6.4.1 @@ -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