smbclient: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Fri, 21 Dec 2018 08:30:58 +0000 (09:30 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 8 Jan 2019 02:40:27 +0000 (03:40 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/client/client.c

index e8faed5..3a31463 100644 (file)
@@ -3359,9 +3359,10 @@ static int cmd_posix_whoami(void)
        }
        d_printf("NUM_SIDS:%" PRIu32 "\n", num_sids);
        for (i = 0; i < num_sids; i++) {
-               char *sid_str = dom_sid_string(ctx, &sids[i]);
-               d_printf("SIDS[%" PRIu32 "]:%s\n", i, sid_str);
-               TALLOC_FREE(sid_str);
+               struct dom_sid_buf buf;
+               d_printf("SIDS[%" PRIu32 "]:%s\n",
+                        i,
+                        dom_sid_str_buf(&sids[i], &buf));
        }
        return 0;
 }