summaryrefslogtreecommitdiffstats
path: root/source3/winbindd/idmap_cache.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2007-12-15 22:00:39 +0100
committerVolker Lendecke <vl@samba.org>2007-12-15 22:09:37 +0100
commit14ef4cdec1ab6be55c97d0f32780cbddbcdde218 (patch)
treee7cb94297496f758a7935aaec62c7dd772e96f3a /source3/winbindd/idmap_cache.c
parentd899b8c56ad6556baf2d2374704cc8cd1b15d5ad (diff)
downloadsamba-14ef4cdec1ab6be55c97d0f32780cbddbcdde218.tar.gz
samba-14ef4cdec1ab6be55c97d0f32780cbddbcdde218.tar.xz
samba-14ef4cdec1ab6be55c97d0f32780cbddbcdde218.zip
Replace sid_string_static with sid_to_string
This adds 28 fstrings on the stack, but I think an fstring on the stack is still far better than a static one. (This used to be commit c7c885078be8fd3024c186044ac28275d7609679)
Diffstat (limited to 'source3/winbindd/idmap_cache.c')
-rw-r--r--source3/winbindd/idmap_cache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/winbindd/idmap_cache.c b/source3/winbindd/idmap_cache.c
index 6455f5ee69f..4e286f88c03 100644
--- a/source3/winbindd/idmap_cache.c
+++ b/source3/winbindd/idmap_cache.c
@@ -77,7 +77,10 @@ void idmap_cache_shutdown(struct idmap_cache_ctx *cache)
NTSTATUS idmap_cache_build_sidkey(TALLOC_CTX *ctx, char **sidkey, const struct id_map *id)
{
- *sidkey = talloc_asprintf(ctx, "IDMAP/SID/%s", sid_string_static(id->sid));
+ fstring sidstr;
+
+ *sidkey = talloc_asprintf(ctx, "IDMAP/SID/%s",
+ sid_to_string(sidstr, id->sid));
if ( ! *sidkey) {
DEBUG(1, ("failed to build sidkey, OOM?\n"));
return NT_STATUS_NO_MEMORY;