admserv/newinst/src/AdminUtil.pm.in | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 56824d9699ad2f471ac4ec30c24c0600735e42f7
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Tue Jul 20 14:18:00 2010 -0700
Fix perl URL parsing code to work with OpenLDAP.
When using PerLDAP built against OpenLDAP, the URL parsing works
a bit differently. This patch makes the Admin Server perl code
work with PerLDAP that uses either OpenLDAP or MozLDAP under the
covers.
diff --git a/admserv/newinst/src/AdminUtil.pm.in b/admserv/newinst/src/AdminUtil.pm.in
index d3808cc..587d408 100644
--- a/admserv/newinst/src/AdminUtil.pm.in
+++ b/admserv/newinst/src/AdminUtil.pm.in
@@ -168,7 +168,15 @@ sub getConfigDSConn {
my $host = $h->{host};
my $port = $h->{port};
my $basedn = $h->{dn};
- if ($h->{options} & LDAP_URL_OPT_SECURE) {
+
+ # If PerLDAP was build using OpenLDAP, we must check the URL scheme
+ # to see if we're using LDAPS. If MozLDAP is being used, we need
+ # to check for the secure option.
+ if ($h->{scheme}) {
+ if ($h->{scheme} eq "ldaps") {
+ $certdir = getCertDir($configdir);
+ }
+ } elsif ($h->{options} & LDAP_URL_OPT_SECURE) {
$certdir = getCertDir($configdir);
}
Show replies by date