summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2007-12-15 21:49:15 +0100
committerVolker Lendecke <vl@samba.org>2007-12-15 22:09:36 +0100
commit54ae9dfcbce727ae3107f21eee68762502acda60 (patch)
tree32a9f58abc4e3050e0a66717b6cab1223b2eabf9 /source3/passdb
parent900288a2b86abd247f9eb4cd15dc5617a17cfef1 (diff)
downloadsamba-54ae9dfcbce727ae3107f21eee68762502acda60.tar.gz
samba-54ae9dfcbce727ae3107f21eee68762502acda60.tar.bz2
samba-54ae9dfcbce727ae3107f21eee68762502acda60.zip
Use sid_string_talloc where we have a tmp talloc ctx
(This used to be commit 0a911d38b8f4be382a9df60f9c6de0c500464b3a)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_ldap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index bb983a6086..b6f8c2d92e 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -3084,7 +3084,7 @@ static NTSTATUS ldapsam_map_posixgroup(TALLOC_CTX *mem_ctx,
smbldap_set_mod(&mods, LDAP_MOD_ADD, "objectClass",
"sambaGroupMapping");
smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, entry, &mods, "sambaSid",
- sid_string_static(&map->sid));
+ sid_string_talloc(mem_ctx, &map->sid));
smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, entry, &mods, "sambaGroupType",
talloc_asprintf(mem_ctx, "%d", map->sid_name_use));
smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, entry, &mods, "displayName",
@@ -4072,8 +4072,9 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
for (i=0; i<num_rids; i++) {
DOM_SID sid;
sid_compose(&sid, domain_sid, rids[i]);
- allsids = talloc_asprintf_append_buffer(allsids, "(sambaSid=%s)",
- sid_string_static(&sid));
+ allsids = talloc_asprintf_append_buffer(
+ allsids, "(sambaSid=%s)",
+ sid_string_talloc(mem_ctx, &sid));
if (allsids == NULL) {
goto done;
}