Blame SOURCES/0004-Ticket-49388-repl-monitor-matches-null-string-many-t.patch

96373c
From 80631ee86fa951f18ed25f61ca72734931eb5387 Mon Sep 17 00:00:00 2001
96373c
From: Mark Reynolds <mreynolds@redhat.com>
96373c
Date: Mon, 2 Oct 2017 16:19:47 -0400
96373c
Subject: [PATCH] Ticket 49388 - repl-monitor - matches null string many times
96373c
 in regex
96373c
96373c
Bug Description:  When using a wildcard(*) for the hostname, some of the
96373c
                  regex's for parsing the various configurations throws
96373c
                  out warnings.
96373c
96373c
Fix Description:  When a wildcard is detected reset the hostnode variable
96373c
                  to nothing.
96373c
96373c
https://pagure.io/389-ds-base/issue/49388
96373c
96373c
Reviewed by: firstyear(Thanks!)
96373c
96373c
(cherry picked from commit 4b41a02484db645a593b9d6ac6c4e062dd374395)
96373c
---
96373c
 ldap/admin/src/scripts/repl-monitor.pl.in | 4 ++++
96373c
 1 file changed, 4 insertions(+)
96373c
96373c
diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in
96373c
index a3efa8e6e..97c1462a5 100755
96373c
--- a/ldap/admin/src/scripts/repl-monitor.pl.in
96373c
+++ b/ldap/admin/src/scripts/repl-monitor.pl.in
96373c
@@ -1053,6 +1053,10 @@ sub add_server
96373c
 	# Remove the domain name from the host name
96373c
 	my ($hostnode) = $host;
96373c
 	$hostnode = $1 if $host =~ /^(.+?)\./;
96373c
+	if ($hostnode eq "*") {
96373c
+		# handle wild card correctly for regex
96373c
+		$hostnode = "";
96373c
+	}
96373c
 
96373c
 	# new host:port
96373c
 	if (!$binddn   || $binddn eq ""   || $binddn eq "*"   ||
96373c
-- 
96373c
2.13.6
96373c