summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-12-01 13:51:39 -0800
committerKarolin Seeger <kseeger@samba.org>2008-12-11 10:27:11 +0100
commit0fa70ce07ed2f6c9dcbbb8cc9302c2f53886f52a (patch)
tree3969a825bde3b27ee307fa3215821837758ea450
parent9628a6a7c73a1bce2700768153a4cdc130690ae5 (diff)
downloadsamba-0fa70ce07ed2f6c9dcbbb8cc9302c2f53886f52a.tar.gz
samba-0fa70ce07ed2f6c9dcbbb8cc9302c2f53886f52a.tar.xz
samba-0fa70ce07ed2f6c9dcbbb8cc9302c2f53886f52a.zip
s3:smbd: only try and fallback to open a directory if it's not a stream open
metze (cherry picked from commit 1008d353f2e4248901ae06ba3b8bd5b1251c5550)
-rw-r--r--source/smbd/open.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 7fd2855dea8..dccfb842aa4 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -2924,6 +2924,13 @@ NTSTATUS create_file_unixpath(connection_struct *conn,
if (NT_STATUS_EQUAL(status, NT_STATUS_FILE_IS_A_DIRECTORY)) {
+ /* A stream open never opens a directory */
+
+ if (base_fsp) {
+ status = NT_STATUS_FILE_IS_A_DIRECTORY;
+ goto fail;
+ }
+
/*
* Fail the open if it was explicitly a non-directory
* file.