From 0fa70ce07ed2f6c9dcbbb8cc9302c2f53886f52a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 1 Dec 2008 13:51:39 -0800 Subject: s3:smbd: only try and fallback to open a directory if it's not a stream open metze (cherry picked from commit 1008d353f2e4248901ae06ba3b8bd5b1251c5550) --- source/smbd/open.c | 7 +++++++ 1 file changed, 7 insertions(+) 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. -- cgit