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>
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;
}