ALT Linux Bugzilla
– Attachment 4591 Details for
Bug 24248
password plugin LDAP driver
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Патч для RC 0.4.0(0.4.1)
roundCube04.passwordPlugin.ldapDriver.patch (text/plain), 1.77 KB, created by
andrey
on 2010-10-08 14:33:06 MSD
(
hide
)
Description:
Патч для RC 0.4.0(0.4.1)
Filename:
MIME Type:
Creator:
andrey
Created:
2010-10-08 14:33:06 MSD
Size:
1.77 KB
patch
obsolete
>--- a/ldap.php2010-09-13 18:15:43 +0300 >+++ b/ldap.php2010-09-13 18:15:50 +0300 >@@ -22,10 +22,42 @@ > // Building user DN > if ($userDN = $rcmail->config->get('password_ldap_userDN_mask')) { > $userDN = substitute_vars($userDN); >+ if (strstr($rcmail->config->get('password_ldap_userDN_mask'), '*')){ >+ if ($rcmail->config->get('password_ldap_host') == NULL){ >+ $ldapHost = "localhost"; >+ } else { >+ $ldapHost = $rcmail->config->get('password_ldap_host'); >+ } >+ if ($rcmail->config->get('password_ldap_port') == NULL){ >+ $ldapPort = 389; >+ } else { >+ $ldapPort = $rcmail->config->get('password_ldap_port'); >+ } >+ $ds = ldap_connect($ldapHost, $ldapPort); >+ if (!$ds){ >+ return PASSWORD_CONNECT_ERROR; >+ } >+ $br = ldap_bind($ds); >+ if (!$br){ >+ return PASSWORD_CONNECT_ERROR; >+ } >+ $nameParts = explode('@', $_SESSION['username']); >+ $ldapFilter = "(uid=$nameParts[0])"; >+ $ldapAttr = array("dn"); >+ $sr = ldap_search($ds, $rcmail->config->get('password_ldap_basedn'), $ldapFilter, $ldapAttr); >+ if ($sr){ >+ $ldapRes = ldap_get_entries($ds, $sr); >+ $userDN = $ldapRes[0]["dn"]; >+ } else { >+ return PASSWORD_CONNECT_ERROR; >+ } >+ ldap_close($ds); >+ } else { >+ $userDN = str_replace('%login', $_SESSION['username'], $rcmail->config->get('password_ldap_userDN_mask')); >+ } > } else { > $userDN = search_userdn($rcmail); > } >- > if (empty($userDN)) { > return PASSWORD_CONNECT_ERROR; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 24248
:
4590
| 4591