diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-01-05 23:16:47 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2004-01-05 23:16:47 +0000 |
commit | fc9892ba7d6d116896793ad83cf1b51aa15c97be (patch) | |
tree | 6ed9197f6080b5017e62db0633e70f4a0bc60eac /source3/passdb | |
parent | 29d86e5e9a0df6799e991a9b260294dc56f6a0b5 (diff) | |
download | samba-fc9892ba7d6d116896793ad83cf1b51aa15c97be.tar.gz samba-fc9892ba7d6d116896793ad83cf1b51aa15c97be.tar.bz2 samba-fc9892ba7d6d116896793ad83cf1b51aa15c97be.zip |
(merge from 3.0)
Show the error message for failure to set the ldap password.
(For 'ldap password sync = yes')
Andrew Bartlett
(This used to be commit ef5d2309c2252c9d6111738075f863b69b616722)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_ldap.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 4d7c7791bd..a1ac042410 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1252,8 +1252,14 @@ static NTSTATUS ldapsam_modify_entry(struct pdb_methods *my_methods, LDAP_EXOP_MODIFY_PASSWD, bv, NULL, NULL, &retoid, &retdata)) != LDAP_SUCCESS) { - DEBUG(0,("ldapsam_modify_entry: LDAP Password could not be changed for user %s: %s\n", - pdb_get_username(newpwd),ldap_err2string(rc))); + char *ld_error = NULL; + ldap_get_option(ldap_state->smbldap_state->ldap_struct, LDAP_OPT_ERROR_STRING, + &ld_error); + DEBUG(0,("ldapsam_modify_entry: LDAP Password could not be changed for user %s: %s\n\t%s\n", + pdb_get_username(newpwd), ldap_err2string(rc), ld_error?ld_error:"unknown")); + SAFE_FREE(ld_error); + ber_bvfree(bv); + return NT_STATUS_UNSUCCESSFUL; } else { DEBUG(3,("ldapsam_modify_entry: LDAP Password changed for user %s\n",pdb_get_username(newpwd))); #ifdef DEBUG_PASSWORD |