jani Thu Jul 12 22:08:58 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/ldap ldap.c
Log:
MFH: - Fixed bug #39291 (ldap_sasl_bind() misses the sasl_authc_id parameter).
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.832&r2=1.2027.2.547.2.833&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.832 php-src/NEWS:1.2027.2.547.2.833
--- php-src/NEWS:1.2027.2.547.2.832 Thu Jul 12 18:58:00 2007
+++ php-src/NEWS Thu Jul 12 22:08:58 2007
@@ -142,9 +142,11 @@
integer as sections). (Tony)
- Fixed bug #41350 (my_thread_global_end() error during request shutdown
on Windows). (Scott, Andrey)
-- Fixed bug #40419 (Trailing Slash in CGI request don't work). (Dmitry)
+- Fixed bug #40419 (Trailing slash in CGI request does not work). (Dmitry)
- Fixed bug #39330 (apache2handler does not call shutdown actions before
apache child die). (isk at ecommerce dot com, Gopal, Tony)
+- Fixed bug #39291 (ldap_sasl_bind() misses the sasl_authc_id parameter).
+ (diafour at gmail dot com, Jani)
- Fixed bug #35981 (pdo-pgsql should not use pkg-config when not present).
(Jani)
http://cvs.php.net/viewvc.cgi/php-src/ext/ldap/ldap.c?r1=1.161.2.3.2.5&r2=1.161.2.3.2.6&diff_format=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.161.2.3.2.5
php-src/ext/ldap/ldap.c:1.161.2.3.2.6
--- php-src/ext/ldap/ldap.c:1.161.2.3.2.5 Mon Apr 30 21:40:02 2007
+++ php-src/ext/ldap/ldap.c Thu Jul 12 22:08:58 2007
@@ -23,7 +23,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ldap.c,v 1.161.2.3.2.5 2007/04/30 21:40:02 tony2001 Exp $ */
+/* $Id: ldap.c,v 1.161.2.3.2.6 2007/07/12 22:08:58 jani Exp $ */
#define IS_EXT_MODULE
#ifdef HAVE_CONFIG_H
@@ -318,7 +318,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "LDAP Support", "enabled");
- php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.161.2.3.2.5
2007/04/30 21:40:02 tony2001 Exp $");
+ php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.161.2.3.2.6
2007/07/12 22:08:58 jani Exp $");
if (LDAPG(max_links) == -1) {
snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
@@ -503,15 +503,15 @@
/* {{{ _php_sasl_setdefs
*/
-static php_ldap_bictx *_php_sasl_setdefs(LDAP *ld, char *sasl_mech, char
*sasl_realm, char *binddn, char *pass, char *sasl_authz_id)
+static php_ldap_bictx *_php_sasl_setdefs(LDAP *ld, char *sasl_mech, char
*sasl_realm, char *sasl_authc_id, char *passwd, char *sasl_authz_id)
{
php_ldap_bictx *ctx;
ctx = ber_memalloc(sizeof(php_ldap_bictx));
ctx->mech = (sasl_mech) ? ber_strdup(sasl_mech) : NULL;
ctx->realm = (sasl_realm) ? ber_strdup(sasl_realm) : NULL;
- ctx->authcid = (binddn) ? ber_strdup(binddn) : NULL;
- ctx->passwd = (pass) ? ber_strdup(pass) : NULL;
+ ctx->authcid = (sasl_authc_id) ? ber_strdup(sasl_authc_id) : NULL;
+ ctx->passwd = (passwd) ? ber_strdup(passwd) : NULL;
ctx->authzid = (sasl_authz_id) ? ber_strdup(sasl_authz_id) : NULL;
if (ctx->mech == NULL) {
@@ -577,28 +577,29 @@
}
/* }}} */
-/* {{{ proto bool ldap_sasl_bind(resource link [, string binddn, string
password, string sasl_mech, string sasl_realm, string sasl_authz_id, string
props])
+/* {{{ proto bool ldap_sasl_bind(resource link [, string binddn, string
password, string sasl_mech, string sasl_realm, string sasl_authc_id, string
sasl_authz_id, string props])
Bind to LDAP directory using SASL */
PHP_FUNCTION(ldap_sasl_bind)
{
zval *link;
ldap_linkdata *ld;
char *binddn = NULL;
- char *pass = NULL;
+ char *passwd = NULL;
char *sasl_mech = NULL;
char *sasl_realm = NULL;
char *sasl_authz_id = NULL;
+ char *sasl_authc_id = NULL;
char *props = NULL;
- int rc, dn_len, pass_len, mech_len, realm_len, authz_id_len, props_len;
+ int rc, dn_len, passwd_len, mech_len, realm_len, authc_id_len,
authz_id_len, props_len;
php_ldap_bictx *ctx;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|ssssss", &link,
&binddn, &dn_len, &pass, &pass_len, &sasl_mech, &mech_len, &sasl_realm,
&realm_len, &sasl_authz_id, &authz_id_len, &props, &props_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|sssssss",
&link, &binddn, &dn_len, &passwd, &passwd_len, &sasl_mech, &mech_len,
&sasl_realm, &realm_len, &sasl_authc_id, &authc_id_len, &sasl_authz_id,
&authz_id_len, &props, &props_len) == FAILURE) {
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(ld, ldap_linkdata *, &link, -1, "ldap link",
le_link);
- ctx = _php_sasl_setdefs(ld->link, sasl_mech, sasl_realm, binddn, pass,
sasl_authz_id);
+ ctx = _php_sasl_setdefs(ld->link, sasl_mech, sasl_realm, sasl_authc_id,
passwd, sasl_authz_id);
if (props) {
ldap_set_option(ld->link, LDAP_OPT_X_SASL_SECPROPS, props);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php