pdb_smbpasswd: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Tue, 11 Dec 2018 15:39:19 +0000 (16:39 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 20 Dec 2018 22:40:24 +0000 (23:40 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source3/passdb/pdb_smbpasswd.c

index 2615cbdd78813066b34b1914d5542cb68a8a3dc5..a9def1260d4ec93b697a1b433fce51769f791e15 100644 (file)
@@ -1332,11 +1332,12 @@ static NTSTATUS smbpasswd_getsampwsid(struct pdb_methods *my_methods, struct sam
        NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
        struct smbpasswd_privates *smbpasswd_state = (struct smbpasswd_privates*)my_methods->private_data;
        struct smb_passwd *smb_pw;
+       struct dom_sid_buf buf;
        FILE *fp = NULL;
        uint32_t rid;
 
        DEBUG(10, ("smbpasswd_getsampwrid: search by sid: %s\n",
-                  sid_string_dbg(sid)));
+                  dom_sid_str_buf(sid, &buf)));
 
        if (!sid_peek_check_rid(get_global_sam_sid(), sid, &rid))
                return NT_STATUS_UNSUCCESSFUL;
@@ -1382,9 +1383,11 @@ static NTSTATUS smbpasswd_getsampwsid(struct pdb_methods *my_methods, struct sam
 
        /* build_sam_account might change the SID on us, if the name was for the guest account */
        if (NT_STATUS_IS_OK(nt_status) && !dom_sid_equal(pdb_get_user_sid(sam_acct), sid)) {
+               struct dom_sid_buf buf1, buf2;
                DEBUG(1, ("looking for user with sid %s instead returned %s "
-                         "for account %s!?!\n", sid_string_dbg(sid),
-                         sid_string_dbg(pdb_get_user_sid(sam_acct)),
+                         "for account %s!?!\n",
+                         dom_sid_str_buf(sid, &buf1),
+                         dom_sid_str_buf(pdb_get_user_sid(sam_acct), &buf2),
                          pdb_get_username(sam_acct)));
                return NT_STATUS_NO_SUCH_USER;
        }