[Kolab-devel] Password change on multi-domain setup

Toke Høiland-Jørgensen <[email protected]>
Newsgroups gmane.comp.kde.devel.kolab
Message-ID <[email protected]>
Had to apply this patch to the currently shipped roundcube to get user
password changing to work in a multi-domain setup (along with
substituting %dc for the manager domain in the password_ldap_basedn and
password_ldap_search_base config items of
/etc/roundcubemail/password.inc.php).

I realise this is probably a patch that should go into upstream
roundcube, and I'll see about submitting it appropriately in the
morning. In the meantime I thought it would be useful to post it here. :)

-Toke

diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php
index cf62deb..d694e64 100644
--- a/plugins/password/drivers/ldap.php
+++ b/plugins/password/drivers/ldap.php
@@ -133,7 +133,7 @@ class rcube_ldap_password
         $ldapConfig = array (
             'binddn'    => $rcmail->config->get('password_ldap_searchDN'),
             'bindpw'    => $rcmail->config->get('password_ldap_searchPW'),
-            'basedn'    => $rcmail->config->get('password_ldap_basedn'),
+            'basedn'    => self::substitute_vars($rcmail->config->get('password_ldap_basedn')),
             'host'      => $rcmail->config->get('password_ldap_host'),
             'port'      => $rcmail->config->get('password_ldap_port'),
             'starttls'  => $rcmail->config->get('password_ldap_starttls'),
@@ -146,7 +146,7 @@ class rcube_ldap_password
             return '';
         }
 
-        $base = $rcmail->config->get('password_ldap_search_base');
+        $base = self::substitute_vars($rcmail->config->get('password_ldap_search_base'));
         $filter = self::substitute_vars($rcmail->config->get('password_ldap_search_filter'));
         $options = array (
             'scope' => 'sub',

_______________________________________________
devel mailing list
[email protected]
https://lists.kolab.org/mailman/listinfo/devel
signature.asc (application/pgp-signature, 489 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQEcBAEBAgAGBQJSZcdIAAoJEENeEGz1+utPt5oIAMqdoYbhRxk603976l3a4Fz4
FJYb6e8BLYOeL/rs60AiFd5Sa/oXHHvTPQ5+4b9XnaVBMPzwZrEFyNsX/ol5sxNC
2zrkRdXayJXoBR8slBRHjYdrN4l4yVp5FhW4DgdkNevMl9s9mqUoZ5s96xPPuUks
A1Ca/ItXn061RrMqWwKgIEunm6XN5toopYNQ46eTs0R1iokGyIho2lh53MwEUJ5e
6gxmm6aV4KS0OW6vhip3nFrRK07g/EGv8krv3XrK3VQv0jFAw3HsHhaCMxI1kAar
rFArR0r0BEiXAOHBfNXIz70TxhA9r/R4VSEK8oZFg7w98rf3eZToStgl89bIvLA=
=RA2w
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.