From 24a40fb41280a9eb22be89699c76eeeb8aab7111 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 14 Nov 2004 23:37:02 +0000 Subject: r3741: FILE_ATTRIBUTE_DIRECTORY is illegal in open of a file (This used to be commit ad7815fababe5783df5e8fb4a490921a5af693d6) --- source4/ntvfs/posix/pvfs_open.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/ntvfs/posix/pvfs_open.c') 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); -- cgit