printing: Fix a DBG message
authorVolker Lendecke <vl@samba.org>
Tue, 8 Mar 2022 14:16:04 +0000 (15:16 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 11 Mar 2022 18:22:28 +0000 (18:22 +0000)
openat_pathref_fsp() returns NTSTATUS, errno might be wrong here

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/printing/nt_printing.c

index 1e35e017fb2b4ea15ccb51670bc4acb9c532a51e..c1d6458e36a29deaf1f37f9fc027f1b0202d3463 100644 (file)
@@ -1098,8 +1098,9 @@ static uint32_t get_correct_cversion(const struct auth_session_info *session_inf
 
        nt_status = openat_pathref_fsp(conn->cwd_fsp, smb_fname);
        if (!NT_STATUS_IS_OK(nt_status)) {
-               DBG_NOTICE("Can't open file [%s], errno =%d\n",
-                          smb_fname_str_dbg(smb_fname), errno);
+               DBG_NOTICE("Can't open file [%s]: %s\n",
+                          smb_fname_str_dbg(smb_fname),
+                          nt_errstr(nt_status));
                *perr = WERR_ACCESS_DENIED;
                goto error_exit;
        }