mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
Show the error message for failure to set the ldap password.
(For 'ldap password sync = yes') Andrew Bartlett (This used to be commit 5b682aef678cc9ee135852d7ee6b8c159902fab7)
This commit is contained in:
parent
db088293ae
commit
988f561477
@ -1252,8 +1252,14 @@ static NTSTATUS ldapsam_modify_entry(struct pdb_methods *my_methods,
|
|||||||
LDAP_EXOP_MODIFY_PASSWD,
|
LDAP_EXOP_MODIFY_PASSWD,
|
||||||
bv, NULL, NULL, &retoid,
|
bv, NULL, NULL, &retoid,
|
||||||
&retdata)) != LDAP_SUCCESS) {
|
&retdata)) != LDAP_SUCCESS) {
|
||||||
DEBUG(0,("ldapsam_modify_entry: LDAP Password could not be changed for user %s: %s\n",
|
char *ld_error = NULL;
|
||||||
pdb_get_username(newpwd),ldap_err2string(rc)));
|
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 {
|
} else {
|
||||||
DEBUG(3,("ldapsam_modify_entry: LDAP Password changed for user %s\n",pdb_get_username(newpwd)));
|
DEBUG(3,("ldapsam_modify_entry: LDAP Password changed for user %s\n",pdb_get_username(newpwd)));
|
||||||
#ifdef DEBUG_PASSWORD
|
#ifdef DEBUG_PASSWORD
|
||||||
|
Loading…
x
Reference in New Issue
Block a user