********************************************************************/
static bool user_can_read_file(connection_struct *conn,
+ struct files_struct *dirfsp,
struct smb_filename *smb_fname)
{
NTSTATUS status;
FILE_READ_ATTRIBUTES|
SEC_STD_READ_CONTROL;
+ SMB_ASSERT(dirfsp == conn->cwd_fsp);
+
/*
* Never hide files from the root user.
* We use (uid_t)0 here not sec_initial_uid()
/* Honour _hide unreadable_ option */
if (hide_unreadable &&
!user_can_read_file(conn,
+ conn->cwd_fsp,
smb_fname_base))
{
DEBUG(10,("is_visible_file: file %s is unreadable.\n",