idmap_tdb: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Thu, 6 Dec 2018 18:12:07 +0000 (19:12 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 7 Dec 2018 22:29:00 +0000 (23:29 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/idmap_tdb.c

index b1f908e2d62a287d2ec99a94f5f31868b513aa0b..c3215c4dd9b0f4f29db3cf6d385536a134e7e78a 100644 (file)
@@ -63,7 +63,7 @@ static int convert_fn(struct db_record *rec, void *private_data)
        NTSTATUS status;
        struct dom_sid sid;
        uint32_t rid;
-       fstring keystr;
+       struct dom_sid_buf keystr;
        fstring dom_name;
        TDB_DATA key;
        TDB_DATA key2;
@@ -104,8 +104,7 @@ static int convert_fn(struct db_record *rec, void *private_data)
 
        sid_compose(&sid, &domain->sid, rid);
 
-       sid_to_fstring(keystr, &sid);
-       key2 = string_term_tdb_data(keystr);
+       key2 = string_term_tdb_data(dom_sid_str_buf(&sid, &keystr));
 
        value = dbwrap_record_get_value(rec);