summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/open.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index a8cc5c9118..420a65b562 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2927,6 +2927,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.