idmap_cache: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Sat, 24 Nov 2018 12:14:23 +0000 (13:14 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 27 Nov 2018 06:13:14 +0000 (07:13 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/idmap_cache.c

index 1d87bbdec45a07bc6e2efe288d52f68fd44955e7..77618dd5aa1489630a825794809148383d71f3a2 100644 (file)
@@ -414,6 +414,7 @@ bool idmap_cache_del_sid(const struct dom_sid *sid)
        bool ret = true;
        bool expired;
        struct unixid id;
+       struct dom_sid_buf sidbuf;
        const char *sid_key;
 
        if (!idmap_cache_find_sid2unixid(sid, &id, &expired)) {
@@ -438,7 +439,7 @@ bool idmap_cache_del_sid(const struct dom_sid *sid)
                }
        }
 
-       sid_key = key_sid2xid_str(mem_ctx, dom_sid_string(mem_ctx, sid));
+       sid_key = key_sid2xid_str(mem_ctx, dom_sid_str_buf(sid, &sidbuf));
        if (sid_key == NULL) {
                return false;
        }