Branch 'kolab-webadmin-2.4' - 2 commits - lib/Auth

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Sun May 13 16:04:22 CEST 2012


 lib/Auth/LDAP.php |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 3d8dcdb5e4dae17c9d636b9d7477a198c379c810
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Sun May 13 15:03:47 2012 +0100

    Use the $entry_dn as the base for the effective_rights

diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index a788c09..65e7859 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -346,7 +346,7 @@ class LDAP
                 '-p',
                 $this->_ldap_port,
                 '-b',
-                $conf->get('base_dn'),
+                '"' . $entry_dn . '"',
                 '-D',
                 '"' . $_SESSION['user']->user_bind_dn . '"',
                 '-w',
@@ -360,7 +360,9 @@ class LDAP
                                 'dn:' . $_SESSION['user']->user_bind_dn // User DN
                             )
                     ) . '"',
-                '"(entrydn=' . $entry_dn . ')"',
+                '-s',
+                'base',
+                '"(objectclass=*)"',
                 '"*"',
             );
 


commit 47d3624dd050c107305f778cdc91160194efbbd1
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Sun May 13 15:01:53 2012 +0100

    Use /usr/lib/mozldap/ldapsearch when no /usr/lib64/mozldap/ldapsearch exists

diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index 52ea985..a788c09 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -333,9 +333,13 @@ class LDAP
 
         //console("effective_rights for $subject resolves to $entry_dn");
 
+        $moz_ldapsearch = "/usr/lib64/mozldap/ldapsearch";
+        if (!is_file($moz_ldapsearch)) {
+            $moz_ldapsearch = "/usr/lib/mozldap/ldapsearch";
+        }
+
         $command = array(
-                // TODO: Very 64-bit specific
-                '/usr/lib64/mozldap/ldapsearch',
+                $moz_ldapsearch,
                 '-x',
                 '-h',
                 $this->_ldap_server,





More information about the commits mailing list