Skip to content

Commit 984f460

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 b4c4a00 commit 984f460

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
@@ -130,10 +130,12 @@ END
130130
last
131131
if (
132132
system_log(
133-
"ldapsearch", "-h", $ldap_server, "-p",
134-
$ldap_port, "-s", "base", "-b",
135-
$ldap_basedn, "-D", $ldap_rootdn, "-y",
136-
$ldap_pwfile, "-n", "'objectclass=*'") == 0);
133+
"ldapsearch", "-sbase",
134+
"-H", $ldap_url,
135+
"-b", $ldap_basedn,
136+
"-D", $ldap_rootdn,
137+
"-y", $ldap_pwfile,
138+
"-n", "'objectclass=*'") == 0);
137139
die "cannot connect to slapd" if ++$retries >= 300;
138140
note "waiting for slapd to accept requests...";
139141
Time::HiRes::usleep(1000000);

0 commit comments

Comments
 (0)