From 1e484da7921e84dc0bb8939401de0188c9cbde5f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 2 Nov 2018 20:54:37 +0100 Subject: [PATCH] idmap: Use dom_sid_str_buf Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/lib/idmap_cache.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source3/lib/idmap_cache.c b/source3/lib/idmap_cache.c index 4c65841fd9c..1d87bbdec45 100644 --- a/source3/lib/idmap_cache.c +++ b/source3/lib/idmap_cache.c @@ -36,7 +36,7 @@ bool idmap_cache_find_sid2unixid(const struct dom_sid *sid, struct unixid *id, bool *expired) { - fstring sidstr; + struct dom_sid_buf sidstr; char *key; char *value = NULL; char *endptr; @@ -45,7 +45,7 @@ bool idmap_cache_find_sid2unixid(const struct dom_sid *sid, struct unixid *id, struct unixid tmp_id; key = talloc_asprintf(talloc_tos(), "IDMAP/SID2XID/%s", - sid_to_fstring(sidstr, sid)); + dom_sid_str_buf(sid, &sidstr)); if (key == NULL) { return false; } @@ -289,11 +289,12 @@ void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid *unix_i { time_t now = time(NULL); time_t timeout; - fstring sidstr, key, value; + fstring key, value; if (!is_null_sid(sid)) { + struct dom_sid_buf sidstr; fstr_sprintf(key, "IDMAP/SID2XID/%s", - sid_to_fstring(sidstr, sid)); + dom_sid_str_buf(sid, &sidstr)); switch (unix_id->type) { case ID_TYPE_UID: fstr_sprintf(value, "%d:U", (int)unix_id->id); -- 2.34.1