winbind: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Sat, 24 Nov 2018 12:25:25 +0000 (13:25 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 27 Nov 2018 09:38:11 +0000 (10:38 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ralph B√∂hme <slow@samba.org>
Autobuild-Date(master): Tue Nov 27 10:38:11 CET 2018 on sn-devel-144

source3/winbindd/winbindd_pam.c

index 873c2f6d3e8154a44e0986ecb3226ce94677987a..b7eb17556a4e8976a444b9caa716166e4c78ac55 100644 (file)
@@ -140,17 +140,13 @@ static NTSTATUS append_info3_as_txt(TALLOC_CTX *mem_ctx,
        }
 
        for (i=0; i < info3->sidcount; i++) {
-               char *sid;
+               struct dom_sid_buf sidbuf;
 
-               sid = dom_sid_string(frame, info3->sids[i].sid);
-               if (sid == NULL) {
-                       status = NT_STATUS_NO_MEMORY;
-                       goto out;
-               }
-
-               ex = talloc_asprintf_append_buffer(ex, "%s:0x%08X\n",
-                                                  sid,
-                                                  info3->sids[i].attributes);
+               ex = talloc_asprintf_append_buffer(
+                       ex,
+                       "%s:0x%08X\n",
+                       dom_sid_str_buf(info3->sids[i].sid, &sidbuf),
+                       info3->sids[i].attributes);
                if (ex == NULL) {
                        status = NT_STATUS_NO_MEMORY;
                        goto out;