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

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