1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

pvfs_open: return FILE_IS_A_DIRECTORY when opening a stream on a directory

metze
(This used to be commit 1421b1cc0c442be839be702647009ed5295f34a3)
This commit is contained in:
Stefan Metzmacher 2008-05-23 09:47:59 +02:00
parent 391b746430
commit 5d648b4aa5

View File

@ -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,