winbindd: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Thu, 20 Dec 2018 20:57:21 +0000 (21:57 +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/winbindd/winbindd_cm.c

index 2e98c76..22d3dca 100644 (file)
@@ -2552,15 +2552,15 @@ no_dssetup:
                            !dom_sid_equal(&domain->sid,
                                           lsa_info->dns.sid))
                        {
+                               struct dom_sid_buf buf1, buf2;
                                DEBUG(1, ("set_dc_type_and_flags_connect: DC "
                                          "for domain %s (%s) claimed it was "
                                          "a DC for domain %s, refusing to "
                                          "initialize\n",
-                                         dom_sid_string(talloc_tos(),
-                                                        &domain->sid),
+                                         dom_sid_str_buf(&domain->sid, &buf1),
                                          domain->name,
-                                         dom_sid_string(talloc_tos(),
-                                                        lsa_info->dns.sid)));
+                                         dom_sid_str_buf(lsa_info->dns.sid,
+                                                         &buf2)));
                                TALLOC_FREE(cli);
                                TALLOC_FREE(mem_ctx);
                                return;
@@ -2611,16 +2611,18 @@ no_dssetup:
                                    !dom_sid_equal(&domain->sid,
                                                lsa_info->account_domain.sid))
                                {
+                                       struct dom_sid_buf buf1, buf2;
                                        DEBUG(1,
                                              ("set_dc_type_and_flags_connect: "
                                               "DC for domain %s (%s) claimed "
                                               "it was a DC for domain %s, "
                                               "refusing to initialize\n",
-                                              dom_sid_string(talloc_tos(),
-                                                             &domain->sid),
+                                              dom_sid_str_buf(
+                                                      &domain->sid, &buf1),
                                               domain->name,
-                                              dom_sid_string(talloc_tos(),
-                                               lsa_info->account_domain.sid)));
+                                              dom_sid_str_buf(
+                                               lsa_info->account_domain.sid,
+                                               &buf2)));
                                        TALLOC_FREE(cli);
                                        TALLOC_FREE(mem_ctx);
                                        return;