File pacemaker-attrd-stonithd-efficient-regular-expression-parsing.patch of Package pacemaker.14737
commit 408a5ed2f7f4e75b6478ce44e65a18d67687d449
Author: Ken Gaillot <kgaillot@redhat.com>
Date: Mon Nov 13 14:58:50 2017 -0600
Low: attrd,stonithd: more efficient regular expression parsing
diff --git a/attrd/commands.c b/attrd/commands.c
index 27d0b73ad..967703f06 100644
--- a/attrd/commands.c
+++ b/attrd/commands.c
@@ -211,7 +211,7 @@ attrd_client_update(xmlNode *xml)
regex_t *r_patt = calloc(1, sizeof(regex_t));
crm_debug("Setting %s to %s", regex, value);
- if (regcomp(r_patt, regex, REG_EXTENDED)) {
+ if (regcomp(r_patt, regex, REG_EXTENDED|REG_NOSUB)) {
crm_err("Bad regex '%s' for update", regex);
} else {
diff --git a/fencing/remote.c b/fencing/remote.c
index 75d4255c2..ace814d85 100644
--- a/fencing/remote.c
+++ b/fencing/remote.c
@@ -722,7 +722,7 @@ topology_matches(const stonith_topology_t *tp, const char *node)
* matching names of nodes to be targeted.
*/
- if (regcomp(&r_patt, tp->target_pattern, REG_EXTENDED)) {
+ if (regcomp(&r_patt, tp->target_pattern, REG_EXTENDED|REG_NOSUB)) {
crm_info("Bad regex '%s' for fencing level", tp->target);
} else {
int status = regexec(&r_patt, node, 0, NULL, 0);