Now we do an early check for opening a directory, this code
could never have been triggered.
The only case we need to consider now is when the filesystem
object exists as a file when we enter open_file() and another
smbd removes and then re-creates the object as a directory before we
call reopen_from_fsp(). In that case, we will open the object,
and come back out to open_file_ntcreate(), where the race
condition detection code that calls check_same_dev_ino()
will catch the case and error out the client request.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
}
}
- /*
- * POSIX allows read-only opens of directories. We don't
- * want to do this (we use a different code path for this)
- * so catch a directory open and return an EISDIR. JRA.
- */
-
- if(S_ISDIR(smb_fname->st.st_ex_mode)) {
- fd_close(fsp);
- return NT_STATUS_FILE_IS_A_DIRECTORY;
- }
-
fsp->file_id = vfs_file_id_from_sbuf(conn, &smb_fname->st);
fsp->vuid = req ? req->vuid : UID_FIELD_INVALID;
fsp->file_pid = req ? req->smbpid : 0;