[389-devel] Please Review: (adminserver) Fix perl URL parsing code to work with OpenLDAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>From 56824d9699ad2f471ac4ec30c24c0600735e42f7 Mon Sep 17 00:00:00 2001
From: Nathan Kinder <nkinder@xxxxxxxxxx>
Date: Tue, 20 Jul 2010 14:18:00 -0700
Subject: [PATCH] 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.
---
 admserv/newinst/src/AdminUtil.pm.in |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

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);
     }
 
-- 
1.6.2.5

--
389-devel mailing list
389-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/389-devel

[Index of Archives]     [Fedora Directory Announce]     [Fedora Users]     [Older Fedora Users Mail]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Review]     [Fedora Art]     [Fedora Music]     [Fedora Packaging]     [CentOS]     [Fedora SELinux]     [Big List of Linux Books]     [KDE Users]     [Fedora Art]     [Fedora Docs]

  Powered by Linux