summaryrefslogtreecommitdiff
path: root/source3/winbindd
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/winbindd
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/winbindd')
-rw-r--r--source3/winbindd/winbindd_misc.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c
index 9d77879e76..43ec5c6d9a 100644
--- a/source3/winbindd/winbindd_misc.c
+++ b/source3/winbindd/winbindd_misc.c
@@ -108,16 +108,16 @@ void winbindd_list_trusted_domains(struct winbindd_cli_state *state)
for ( d=domain_list(); d; d=d->next ) {
if ( !extra_data ) {
- extra_data = talloc_asprintf(state->mem_ctx, "%s\\%s\\%s",
- d->name,
- d->alt_name ? d->alt_name : d->name,
- sid_string_static(&d->sid));
+ extra_data = talloc_asprintf(
+ state->mem_ctx, "%s\\%s\\%s",
+ d->name, d->alt_name ? d->alt_name : d->name,
+ sid_string_talloc(state->mem_ctx, &d->sid));
} else {
- extra_data = talloc_asprintf(state->mem_ctx, "%s\n%s\\%s\\%s",
- extra_data,
- d->name,
- d->alt_name ? d->alt_name : d->name,
- sid_string_static(&d->sid));
+ extra_data = talloc_asprintf(
+ state->mem_ctx, "%s\n%s\\%s\\%s",
+ extra_data, d->name,
+ d->alt_name ? d->alt_name : d->name,
+ sid_string_talloc(state->mem_ctx, &d->sid));
}
}
@@ -163,17 +163,18 @@ enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *
extra_data = talloc_strdup(state->mem_ctx, "");
if (num_domains > 0)
- extra_data = talloc_asprintf(state->mem_ctx, "%s\\%s\\%s",
- names[0],
- alt_names[0] ? alt_names[0] : names[0],
- sid_string_static(&sids[0]));
+ extra_data = talloc_asprintf(
+ state->mem_ctx, "%s\\%s\\%s",
+ names[0], alt_names[0] ? alt_names[0] : names[0],
+ sid_string_talloc(state->mem_ctx, &sids[0]));
for (i=1; i<num_domains; i++)
- extra_data = talloc_asprintf(state->mem_ctx, "%s\n%s\\%s\\%s",
- extra_data,
- names[i],
- alt_names[i] ? alt_names[i] : names[i],
- sid_string_static(&sids[i]));
+ extra_data = talloc_asprintf(
+ state->mem_ctx, "%s\n%s\\%s\\%s",
+ extra_data, names[i],
+ alt_names[i] ? alt_names[i] : names[i],
+ sid_string_talloc(state->mem_ctx, &sids[i]));
+
/* add our primary domain */
for (i=0; i<num_domains; i++) {
@@ -184,11 +185,11 @@ enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *
}
if (state->request.data.list_all_domains && !have_own_domain) {
- extra_data = talloc_asprintf(state->mem_ctx, "%s\n%s\\%s\\%s",
- extra_data,
- domain->name,
- domain->alt_name ? domain->alt_name : domain->name,
- sid_string_static(&domain->sid));
+ extra_data = talloc_asprintf(
+ state->mem_ctx, "%s\n%s\\%s\\%s",
+ extra_data, domain->name,
+ domain->alt_name ? domain->alt_name : domain->name,
+ sid_string_talloc(state->mem_ctx, &domain->sid));
}
/* This is a bit excessive, but the extra data sooner or later will be