[PATCH] Bugs LDAPSAM : 2 fixes
Aurélien Degrémont
adegremont at idealx.com
Thu Oct 30 16:57:31 GMT 2003
Hi,
I recently posted a message concerning a bug with ldapsam.
On September somebody posted the same bug concerning rpc vampire (on
samba mailing-list) and explained that with rc1 it was ok.
It affects only the group mapping update with LDAPSAM.
It was a bug which appeared between the RC3 and RC4 on pdb_ldap.c. Here
is a patch which correct it.
Moreover a problem appeared also inside the group mapping update with
LDAPSAM when User Manager is used. When a the group members are changed,
and not the group description, User Manager send a SendGroupInfo
Request, even if there is no changes. The samba function test if
modifications are needed, and if not, it send an error (see "mods is
empty: nothing to do"). I just change the behaviour to return a success,
in this case.
Wainting for your comments.
Aurélien Degrémont
-------------- next part --------------
diff -ruN samba-3.0.1pre1-orig/source/passdb/pdb_ldap.c samba-3.0.1pre1/source/passdb/pdb_ldap.c
--- samba-3.0.1pre1-orig/source/passdb/pdb_ldap.c Fri Oct 10 20:08:36 2003
+++ samba-3.0.1pre1/source/passdb/pdb_ldap.c Thu Oct 30 08:50:14 2003
@@ -1983,11 +1983,10 @@
return NT_STATUS_UNSUCCESSFUL;
}
- ldap_msgfree(result);
-
if (mods == NULL) {
DEBUG(4, ("ldapsam_update_group_mapping_entry: mods is empty: nothing to do\n"));
- return NT_STATUS_UNSUCCESSFUL;
+ ldap_msgfree(result);
+ return NT_STATUS_OK;
}
dn = smbldap_get_dn(ldap_state->smbldap_state->ldap_struct, entry);
@@ -1998,6 +1997,7 @@
SAFE_FREE(dn);
ldap_mods_free(mods, True);
+ ldap_msgfree(result);
if (rc != LDAP_SUCCESS) {
char *ld_error = NULL;
More information about the samba-technical
mailing list