libnet: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Fri, 7 Dec 2018 09:25:09 +0000 (10:25 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 7 Dec 2018 22:29:01 +0000 (23:29 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libnet/libnet_dssync_passdb.c

index 8e2a459..1b15194 100644 (file)
@@ -1482,7 +1482,7 @@ static NTSTATUS handle_alias_object(struct dssync_passdb *pctx,
        struct dom_sid group_sid;
        uint32_t rid = 0;
        struct dom_sid *dom_sid = NULL;
-       fstring sid_string;
+       struct dom_sid_buf sid_str;
        GROUP_MAP *map;
        bool insert = true;
 
@@ -1529,9 +1529,10 @@ static NTSTATUS handle_alias_object(struct dssync_passdb *pctx,
                goto done;
        }
 
-       sid_to_fstring(sid_string, &group_sid);
        DEBUG(0,("Creating alias[%s] - %s members[%u]\n",
-                 map->nt_name, sid_string, num_members));
+                map->nt_name,
+                dom_sid_str_buf(&group_sid, &sid_str),
+                num_members));
 
        status = dssync_insert_obj(pctx, pctx->aliases, obj);
        if (!NT_STATUS_IS_OK(status)) {
@@ -1617,7 +1618,7 @@ static NTSTATUS handle_group_object(struct dssync_passdb *pctx,
        NTSTATUS status;
        struct group *grp = NULL;
        struct dom_sid group_sid;
-       fstring sid_string;
+       struct dom_sid_buf sid_str;
        GROUP_MAP *map;
        bool insert = true;
 
@@ -1660,9 +1661,10 @@ static NTSTATUS handle_group_object(struct dssync_passdb *pctx,
                goto done;
        }
 
-       sid_to_fstring(sid_string, &group_sid);
        DEBUG(0,("Creating group[%s] - %s members [%u]\n",
-                 map->nt_name, sid_string, num_members));
+                map->nt_name,
+                dom_sid_str_buf(&group_sid, &sid_str),
+                num_members));
 
        status = dssync_insert_obj(pctx, pctx->groups, obj);
        if (!NT_STATUS_IS_OK(status)) {