s3:smbd: only try and fallback to open a directory if it's not a stream open
authorStefan Metzmacher <metze@samba.org>
Mon, 1 Dec 2008 21:52:28 +0000 (13:52 -0800)
committerJeremy Allison <jra@samba.org>
Mon, 1 Dec 2008 21:52:28 +0000 (13:52 -0800)
metze

source3/smbd/open.c

index a8cc5c91180a7277638ee17e002ca7104a631f6e..420a65b562d12178f724bdb58d434cf31d7d5059 100644 (file)
@@ -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.