The Samba-Bugzilla – Attachment 4610 Details for
Bug 5886
ldapsam: Samba's use of the modify password exop causes password change propagation to fail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 3.4 with TALLOC_FREE->SAFE_FREE
0001-Fix-bug-5886.patch (text/plain), 2.19 KB, created by
Volker Lendecke
on 2009-08-30 04:27:38 UTC
(
hide
)
Description:
Patch for 3.4 with TALLOC_FREE->SAFE_FREE
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2009-08-30 04:27:38 UTC
Size:
2.19 KB
patch
obsolete
>From 48a2eddfae31b32f313670a90d26ec96c18fbd66 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Tue, 14 Jul 2009 23:12:59 +0200 >Subject: [PATCH] Fix bug 5886 > >Ok, that's a very long-standing one. I finally got around to install a recent >OpenLDAP and test the different variants of setting a NULL password etc. > >Thanks all for your patience! > >Volker >--- > source3/passdb/pdb_ldap.c | 34 ++++++++++++++++++++++++++-------- > 1 files changed, 26 insertions(+), 8 deletions(-) > >diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c >index 0886a10..cf4889b 100644 >--- a/source3/passdb/pdb_ldap.c >+++ b/source3/passdb/pdb_ldap.c >@@ -1700,6 +1700,7 @@ static NTSTATUS ldapsam_modify_entry(struct pdb_methods *my_methods, > char *utf8_password; > char *utf8_dn; > size_t converted_size; >+ int ret; > > if (!ldap_state->is_nds_ldap) { > >@@ -1731,14 +1732,31 @@ static NTSTATUS ldapsam_modify_entry(struct pdb_methods *my_methods, > } > > if ((ber_printf (ber, "{") < 0) || >- (ber_printf (ber, "ts", LDAP_TAG_EXOP_MODIFY_PASSWD_ID, utf8_dn) < 0) || >- (ber_printf (ber, "ts", LDAP_TAG_EXOP_MODIFY_PASSWD_NEW, utf8_password) < 0) || >- (ber_printf (ber, "n}") < 0)) { >- DEBUG(0,("ldapsam_modify_entry: ber_printf returns a value <0\n")); >- ber_free(ber,1); >- SAFE_FREE(utf8_dn); >- SAFE_FREE(utf8_password); >- return NT_STATUS_UNSUCCESSFUL; >+ (ber_printf (ber, "ts", LDAP_TAG_EXOP_MODIFY_PASSWD_ID, >+ utf8_dn) < 0)) { >+ DEBUG(0,("ldapsam_modify_entry: ber_printf returns a " >+ "value <0\n")); >+ ber_free(ber,1); >+ SAFE_FREE(utf8_dn); >+ SAFE_FREE(utf8_password); >+ return NT_STATUS_UNSUCCESSFUL; >+ } >+ >+ if ((utf8_password != NULL) && (*utf8_password != '\0')) { >+ ret = ber_printf(ber, "ts}", >+ LDAP_TAG_EXOP_MODIFY_PASSWD_NEW, >+ utf8_password); >+ } else { >+ ret = ber_printf(ber, "}"); >+ } >+ >+ if (ret < 0) { >+ DEBUG(0,("ldapsam_modify_entry: ber_printf returns a " >+ "value <0\n")); >+ ber_free(ber,1); >+ SAFE_FREE(utf8_dn); >+ SAFE_FREE(utf8_password); >+ return NT_STATUS_UNSUCCESSFUL; > } > > if ((rc = ber_flatten (ber, &bv))<0) { >-- >1.6.2.1 >
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 Raw
Actions:
View
Attachments on
bug 5886
:
3901
|
3902
|
3926
|
4089
|
4416
| 4610 |
5461