andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

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

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