diff options
author | Andres Freund <andres@anarazel.de> | 2021-10-19 10:14:49 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2021-10-19 11:15:45 -0700 |
commit | 9aef4015573905ff8edec19e38c47ff820277153 (patch) | |
tree | ce008a37317416e4b80087076a8e08ccd3ea1bc1 /src | |
parent | ae7b1dd5900156c3d58d88bf47532adcb27cca26 (diff) | |
download | postgresql-9aef4015573905ff8edec19e38c47ff820277153.tar.gz postgresql-9aef4015573905ff8edec19e38c47ff820277153.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/ldap/t/001_auth.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl index 3bc7672451e..2c279a922b5 100644 --- a/src/test/ldap/t/001_auth.pl +++ b/src/test/ldap/t/001_auth.pl @@ -127,10 +127,12 @@ while (1) last if ( system_log( - "ldapsearch", "-h", $ldap_server, "-p", - $ldap_port, "-s", "base", "-b", - $ldap_basedn, "-D", $ldap_rootdn, "-y", - $ldap_pwfile, "-n", "'objectclass=*'") == 0); + "ldapsearch", "-sbase", + "-H", $ldap_url, + "-b", $ldap_basedn, + "-D", $ldap_rootdn, + "-y", $ldap_pwfile, + "-n", "'objectclass=*'") == 0); die "cannot connect to slapd" if ++$retries >= 300; note "waiting for slapd to accept requests..."; Time::HiRes::usleep(1000000); |