summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-03-14 18:01:06 +0100
committerVolker Lendecke <vl@samba.org>2008-03-14 18:01:23 +0100
commitf3856d074f5c4fa91eece95833386130253a5ce4 (patch)
tree609db2ee6dd1b8ed5c841674ecdbef3d3a2aa6b3
parent59d6feb469bcc257162bac4bd232ef2f5d210a71 (diff)
downloadsamba-f3856d074f5c4fa91eece95833386130253a5ce4.tar.gz
samba-f3856d074f5c4fa91eece95833386130253a5ce4.tar.bz2
samba-f3856d074f5c4fa91eece95833386130253a5ce4.zip
Fix bug 4901
(This used to be commit 1dd8fa9a521046f1de8173ac00224706c5249665)
-rw-r--r--WHATSNEW.txt1
-rw-r--r--source3/passdb/pdb_ldap.c11
2 files changed, 9 insertions, 3 deletions
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 3928e6d181..a9ca3526b3 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -305,6 +305,7 @@ o Volker Lendecke <vl@samba.org>
* Add implicit temporary talloc contexts via talloc_stack().
* Speed up the smbclient "get" command
* Add the aio_fork module
+ * Fix bug 4901
o Derrell Lipman <derrell@samba.org>
* Modified libsmbclient API for more easily maintaining ABI compatibility
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index dec9b5bafb..d941abb00e 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -1913,8 +1913,9 @@ static NTSTATUS ldapsam_update_sam_account(struct pdb_methods *my_methods, struc
ldap_mods_free(mods,True);
return NT_STATUS_UNSUCCESSFUL;
}
-
- if (mods == NULL) {
+
+ if ((lp_ldap_passwd_sync() != LDAP_PASSWD_SYNC_ONLY)
+ && (mods == NULL)) {
DEBUG(4,("ldapsam_update_sam_account: mods is empty: nothing to update for user: %s\n",
pdb_get_username(newpwd)));
SAFE_FREE(dn);
@@ -1922,7 +1923,11 @@ static NTSTATUS ldapsam_update_sam_account(struct pdb_methods *my_methods, struc
}
ret = ldapsam_modify_entry(my_methods,newpwd,dn,mods,LDAP_MOD_REPLACE, element_is_changed);
- ldap_mods_free(mods,True);
+
+ if (mods != NULL) {
+ ldap_mods_free(mods,True);
+ }
+
SAFE_FREE(dn);
/*