summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-05-23 09:47:59 +0200
committerStefan Metzmacher <metze@samba.org>2008-05-23 09:55:15 +0200
commit5d648b4aa5540e91fa7ea77668965eefd8926b1a (patch)
treeacaefdf1376961f6862dec1d7e6ae89bd4a36b67 /source4
parent391b746430ad3d0b371930933e0a77e6a70a9ac0 (diff)
downloadsamba-5d648b4aa5540e91fa7ea77668965eefd8926b1a.tar.gz
samba-5d648b4aa5540e91fa7ea77668965eefd8926b1a.tar.bz2
samba-5d648b4aa5540e91fa7ea77668965eefd8926b1a.zip
pvfs_open: return FILE_IS_A_DIRECTORY when opening a stream on a directory
metze (This used to be commit 1421b1cc0c442be839be702647009ed5295f34a3)
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index cc4f0add27..926c99d37e 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -182,12 +182,19 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
bool del_on_close;
uint32_t create_options;
uint32_t share_access;
+ bool forced;
create_options = io->generic.in.create_options;
share_access = io->generic.in.share_access;
+ forced = (io->generic.in.create_options & NTCREATEX_OPTIONS_DIRECTORY)?true:false;
+
if (name->stream_name) {
- return NT_STATUS_NOT_A_DIRECTORY;
+ if (forced) {
+ return NT_STATUS_NOT_A_DIRECTORY;
+ } else {
+ return NT_STATUS_FILE_IS_A_DIRECTORY;
+ }
}
/* if the client says it must be a directory, and it isn't,