auth: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Thu, 18 Oct 2018 04:08:19 +0000 (06:08 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 2 Nov 2018 20:21:14 +0000 (21:21 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
auth/auth_log.c

index 9e57b1d3968c52d6832d374587a8ce03342b35f3..96c396357c476b2c805712358573c97c0528b43d 100644 (file)
@@ -578,14 +578,13 @@ static void log_authentication_event_human_readable(
        local = tsocket_address_string(ui->local_host, frame);
 
        if (NT_STATUS_IS_OK(status)) {
-               char sid_buf[DOM_SID_STR_BUFLEN];
+               struct dom_sid_buf sid_buf;
 
-               dom_sid_string_buf(sid, sid_buf, sizeof(sid_buf));
                logon_line = talloc_asprintf(frame,
                                             " became [%s]\\[%s] [%s].",
                                             log_escape(frame, domain_name),
                                             log_escape(frame, account_name),
-                                            sid_buf);
+                                            dom_sid_str_buf(sid, &sid_buf));
        } else {
                logon_line = talloc_asprintf(
                                frame,