From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Pokorný Date: Mon, 9 Dec 2013 15:16:24 +0100 Subject: [Cluster-devel] [PATCHv3 6/6] rgmanager: ra2rng.xsl: script-file: try to prevent cluster's services In-Reply-To: <1386165012-27413-1-git-send-email-jpokorny@redhat.com> References: <1386165012-27413-1-git-send-email-jpokorny@redhat.com> Message-ID: <1386598584-15254-1-git-send-email-jpokorny@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Note that, AFAIK, "file" parameter to "script" can be arbitrary string with a logical limitation to be something (builtins, aliases, etc. not excluded) that will run when pasted verbatim to the bash prompt (with no quotes added) followed by the desired action and fired up. Hence any leading/trailing whitespace really does not matter. The restriction being added reflects this automatically by using "token" datatype, but unfortunately libxml2 currently contains a bug leading to not dropping such whitespace correctly before applying additional facet checking (here: pattern) [1]. Until libxml2 is fixed, the restriction will miss cases where "file" starts/ends with balast whitespace. Also note that this restriction can be easily bypassed by, e.g., using ":; /etc/init.d/cman", but it's purpose is to prevent from random mis-writing "cman" instead of the desired service. And finally, as pointed out by Fabio, there can be (highly experimental) cases when cluster/rgmanager actively manages cluster's own auxiliary management services like ricci and/or modclusterd (note that standard management tools like ccs and luci would then be likely unusable and one would have to deal with, e.g., configuration updates manually in a low-level way given that also "cman_tool version -r" would be unusable). [1] https://mail.gnome.org/archives/xml/2013-November/msg00024.html Signed-off-by: Jan Pokorn? --- rgmanager/src/resources/ra2rng.xsl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/rgmanager/src/resources/ra2rng.xsl b/rgmanager/src/resources/ra2rng.xsl index 2f81d16..c939582 100644 --- a/rgmanager/src/resources/ra2rng.xsl +++ b/rgmanager/src/resources/ra2rng.xsl @@ -69,6 +69,19 @@ + + + + + + + + /etc/(rc\.d/)?init\.d/(cman|rgmanager)(\s.*|) + + + + + -- 1.8.1.4