diff options
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index b07922dcbd..9bb3487679 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -809,6 +809,10 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, flags |= O_RDONLY; } + if (io->generic.in.file_attr & FILE_ATTRIBUTE_DIRECTORY) { + return NT_STATUS_INVALID_PARAMETER; + } + /* handle creating a new file separately */ if (!name->exists) { status = pvfs_create_file(pvfs, req, name, io); |