svn commit: samba r13687 - in trunk/source/passdb: .
vlendec at samba.org
vlendec at samba.org
Sat Feb 25 12:27:15 GMT 2006
Author: vlendec
Date: 2006-02-25 12:27:15 +0000 (Sat, 25 Feb 2006)
New Revision: 13687
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13687
Log:
We also have talloc_autofree_ldapmod.... ;-)
Modified:
trunk/source/passdb/pdb_ldap.c
Changeset:
Modified: trunk/source/passdb/pdb_ldap.c
===================================================================
--- trunk/source/passdb/pdb_ldap.c 2006-02-25 12:04:31 UTC (rev 13686)
+++ trunk/source/passdb/pdb_ldap.c 2006-02-25 12:27:15 UTC (rev 13687)
@@ -4720,6 +4720,8 @@
smbldap_set_mod(&mods, LDAP_MOD_ADD, "loginShell", shell);
}
+ talloc_autofree_ldapmod(tmp_ctx, mods);
+
if (add_posix) {
rc = smbldap_add(ldap_state->smbldap_state, dn, mods);
} else {
@@ -4728,12 +4730,10 @@
if (rc != LDAP_SUCCESS) {
DEBUG(0,("ldapsam_create_user: failed to create a new user [%s] (dn = %s)\n", name ,dn));
- ldap_mods_free(mods, True);
return NT_STATUS_UNSUCCESSFUL;
}
DEBUG(2,("ldapsam_create_user: added account [%s] in the LDAP database\n", name));
- ldap_mods_free(mods, True);
return NT_STATUS_OK;
}
@@ -4864,6 +4864,7 @@
smbldap_set_mod(&mods, LDAP_MOD_ADD, "sambaSid", groupsidstr);
smbldap_set_mod(&mods, LDAP_MOD_ADD, "sambaGroupType", grouptype);
smbldap_set_mod(&mods, LDAP_MOD_ADD, "displayName", name);
+ talloc_autofree_ldapmod(tmp_ctx, mods);
if (is_new_entry) {
rc = smbldap_add(ldap_state->smbldap_state, dn, mods);
@@ -4881,12 +4882,10 @@
if (rc != LDAP_SUCCESS) {
DEBUG(0,("ldapsam_create_group: failed to create a new group [%s] (dn = %s)\n", name ,dn));
- ldap_mods_free(mods, True);
return NT_STATUS_UNSUCCESSFUL;
}
DEBUG(2,("ldapsam_create_group: added group [%s] in the LDAP database\n", name));
- ldap_mods_free(mods, True);
return NT_STATUS_OK;
}
More information about the samba-cvs
mailing list