summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-14 23:37:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:49 -0500
commit24a40fb41280a9eb22be89699c76eeeb8aab7111 (patch)
tree90e10309b0aedf0387bc2a65a169c197b19f2ccf
parent1824d52ff2c5492b091502c9fcf70aa073b51b37 (diff)
downloadsamba-24a40fb41280a9eb22be89699c76eeeb8aab7111.tar.gz
samba-24a40fb41280a9eb22be89699c76eeeb8aab7111.tar.bz2
samba-24a40fb41280a9eb22be89699c76eeeb8aab7111.zip
r3741: FILE_ATTRIBUTE_DIRECTORY is illegal in open of a file
(This used to be commit ad7815fababe5783df5e8fb4a490921a5af693d6)
-rw-r--r--source4/ntvfs/posix/pvfs_open.c4
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);