From: Volker Lendecke Date: Fri, 2 Nov 2018 19:54:37 +0000 (+0100) Subject: idmap: Use dom_sid_str_buf X-Git-Url: http://git.samba.org/samba.git/?p=amitay%2Fsamba.git;a=commitdiff_plain;h=1e484da7921e84dc0bb8939401de0188c9cbde5f idmap: Use dom_sid_str_buf Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- 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);