Skip to content

Commit 9aef401

Browse files
committed
Adapt src/test/ldap/t/001_auth.pl to work with openldap 2.5.
ldapsearch's deprecated -h/-p arguments were removed, need to use -H now - which has been around for over 20 years. As perltidy insists on reflowing the parameters anyway, change order and "phrasing" to yield a less confusing layout (per suggestion from Tom Lane). Discussion: https://postgr.es/m/20211009233850.wvr6apcrw2ai6cnj@alap3.anarazel.de Backpatch: 11-, where the tests were added.
1 parent ae7b1dd commit 9aef401

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/test/ldap/t/001_auth.pl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,12 @@ END
127127
last
128128
if (
129129
system_log(
130-
"ldapsearch", "-h", $ldap_server, "-p",
131-
$ldap_port, "-s", "base", "-b",
132-
$ldap_basedn, "-D", $ldap_rootdn, "-y",
133-
$ldap_pwfile, "-n", "'objectclass=*'") == 0);
130+
"ldapsearch", "-sbase",
131+
"-H", $ldap_url,
132+
"-b", $ldap_basedn,
133+
"-D", $ldap_rootdn,
134+
"-y", $ldap_pwfile,
135+
"-n", "'objectclass=*'") == 0);
134136
die "cannot connect to slapd" if ++$retries >= 300;
135137
note "waiting for slapd to accept requests...";
136138
Time::HiRes::usleep(1000000);

0 commit comments

Comments
 (0)