From: Stefan Metzmacher Date: Mon, 1 Dec 2008 21:52:28 +0000 (-0800) Subject: s3:smbd: only try and fallback to open a directory if it's not a stream open X-Git-Tag: samba-4.0.0alpha6~480^2~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=787b0536b7a8d3b13bcb3b0f1d8f7ef7d99f4561;p=thirdparty%2Fsamba.git s3:smbd: only try and fallback to open a directory if it's not a stream open metze --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index a8cc5c91180..420a65b562d 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.