From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Pokorný Date: Tue, 3 Dec 2013 19:26:18 +0100 Subject: [Cluster-devel] [PATCH 6/6] rgmanager: ra2rng.xsl: script-file: try to prevent cluster's services In-Reply-To: <1386095178-23404-1-git-send-email-jpokorny@redhat.com> References: <1386095178-23404-1-git-send-email-jpokorny@redhat.com> Message-ID: <1386095178-23404-8-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 when fired it will eventually proceed something. Hence any leading/trailing whitespace really does not matter. The restriction being added establishes 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. [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 b4944e7..e64ac06 100644 --- a/rgmanager/src/resources/ra2rng.xsl +++ b/rgmanager/src/resources/ra2rng.xsl @@ -71,6 +71,19 @@ + + + + + + + + /etc/(rc\.d/)?init\.d/(cman|modclusterd|rgmanager|ricci)(\s.*|) + + + + + -- 1.8.1.4