From: Volker Lendecke Date: Sat, 24 Nov 2018 12:25:25 +0000 (+0100) Subject: winbind: Use dom_sid_str_buf X-Git-Tag: tdb-1.3.17~609 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb7c3b7c8f600c8e5e0c35325968163d7ffa3c53;p=thirdparty%2Fsamba.git winbind: Use dom_sid_str_buf Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Tue Nov 27 10:38:11 CET 2018 on sn-devel-144 --- diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 873c2f6d3e8..b7eb17556a4 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -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;