summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1999-05-28 19:18:23 +0000
committerJeremy Allison <jra@samba.org>1999-05-28 19:18:23 +0000
commit7bd393f2338b4c6e84ebff55fd567ae840108c06 (patch)
treee7cd1db97320993b264a17db22409f0ca769dae6
parent1e99f092260f85fb7fb283b0b9aacd19f6d6b3c0 (diff)
downloadsamba-7bd393f2338b4c6e84ebff55fd567ae840108c06.tar.gz
99.9999999% sure this is the correct fix for the directory open bugs.
I finally noticed in the Lotus Notes capture file that the "FILE_NON_DIRECTORY" flag was being set in create options for a open on a directory that should fail. All the other heuristics were incorrect. Jeremy.
-rw-r--r--source/smbd/nttrans.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index 6838b9c0f0f..aff1195dc92 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -784,13 +784,10 @@ int reply_ntcreate_and_X(connection_struct *conn,
if(errno == EISDIR) {
/*
- * We only fall back to directory open if no oplock was
- * requested and no read/write data was requested.
+ * Fail the open if it was explicitly a non-directory file.
*/
- if(oplock_request || (desired_access & (FILE_READ_DATA|FILE_WRITE_DATA|
- FILE_APPEND_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA|
- FILE_WRITE_ATTRIBUTES|FILE_WRITE_EA))) {
+ if (create_options & FILE_NON_DIRECTORY_FILE) {
SSVAL(outbuf, smb_flg2, FLAGS2_32_BIT_ERROR_CODES);
return(ERROR(0, 0xc0000000|NT_STATUS_FILE_IS_A_DIRECTORY));
}