rpc_server3: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Sat, 8 Dec 2018 14:27:24 +0000 (15:27 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 10 Dec 2018 23:40:31 +0000 (00:40 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_server/lsa/srv_lsa_nt.c
source3/rpc_server/mdssvc/srv_mdssvc_nt.c

index a3254a61667aa36002e686ab6e3ea869046c84e7..f61efbb9fc8a180ad49401ac902d8bb526f46b80 100644 (file)
@@ -1959,8 +1959,9 @@ NTSTATUS _lsa_DeleteTrustedDomain(struct pipes_struct *p,
        }
 
        if (td->netbios_name == NULL || *td->netbios_name == '\0') {
+               struct dom_sid_buf buf;
                DEBUG(10, ("Missing netbios name for for trusted domain %s.\n",
-                          sid_string_tos(r->in.dom_sid)));
+                          dom_sid_str_buf(r->in.dom_sid, &buf)));
                return NT_STATUS_UNSUCCESSFUL;
        }
 
index c2770a2ec6c8373aa44a5a80464cc567c3c3ba91..ab64423d0dfa7dc3aeeb57ab342b06fdc23976cf 100644 (file)
@@ -25,6 +25,7 @@
 #include "rpc_server/mdssvc/srv_mdssvc_nt.h"
 #include "../librpc/gen_ndr/srv_mdssvc.h"
 #include "libcli/security/security_token.h"
+#include "libcli/security/dom_sid.h"
 #include "gen_ndr/auth.h"
 #include "mdssvc.h"
 
@@ -208,8 +209,9 @@ void _mdssvc_cmd(struct pipes_struct *p, struct mdssvc_cmd *r)
        ok = security_token_is_sid(p->session_info->security_token,
                                   &mds_ctx->sid);
        if (!ok) {
-               DEBUG(1,("%s: not the same sid: %s\n", __func__,
-                        sid_string_tos(&mds_ctx->sid)));
+               struct dom_sid_buf buf;
+               DBG_WARNING("not the same sid: %s\n",
+                           dom_sid_str_buf(&mds_ctx->sid, &buf));
                p->fault_state = DCERPC_FAULT_ACCESS_DENIED;
                return;
        }