From 4b41a02484db645a593b9d6ac6c4e062dd374395 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Oct 03 2017 12:18:36 +0000 Subject: Ticket 49388 - repl-monitor - matches null string many times in regex Bug Description: When using a wildcard(*) for the hostname, some of the regex's for parsing the various configurations throws out warnings. Fix Description: When a wildcard is detected reset the hostnode variable to nothing. https://pagure.io/389-ds-base/issue/49388 Reviewed by: firstyear(Thanks!) --- diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in index a3efa8e..97c1462 100755 --- a/ldap/admin/src/scripts/repl-monitor.pl.in +++ b/ldap/admin/src/scripts/repl-monitor.pl.in @@ -1053,6 +1053,10 @@ sub add_server # Remove the domain name from the host name my ($hostnode) = $host; $hostnode = $1 if $host =~ /^(.+?)\./; + if ($hostnode eq "*") { + # handle wild card correctly for regex + $hostnode = ""; + } # new host:port if (!$binddn || $binddn eq "" || $binddn eq "*" ||