winbind: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Fri, 26 Oct 2018 06:25:14 +0000 (08:25 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 9 Nov 2018 21:42:28 +0000 (22:42 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd_pam.c

index bed5a940282157801729384ed288020911554e02..a02926decb24dc5dc53160871730eaf366bb6cde 100644 (file)
@@ -251,13 +251,15 @@ static NTSTATUS append_afs_token(TALLOC_CTX *mem_ctx,
 
        {
                struct dom_sid user_sid;
-               fstring sidstr;
+               struct dom_sid_buf sidstr;
 
                sid_compose(&user_sid, info3->base.domain_sid,
                            info3->base.rid);
-               sid_to_fstring(sidstr, &user_sid);
-               afsname = talloc_string_sub(mem_ctx, afsname,
-                                           "%s", sidstr);
+               afsname = talloc_string_sub(
+                       mem_ctx,
+                       afsname,
+                       "%s",
+                       dom_sid_str_buf(&user_sid, &sidstr));
        }
 
        if (afsname == NULL) {