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

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