summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-22 17:53:50 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-22 17:53:50 +1000
commit7a9ffeca21666935ba08cd909b63fc063f7607f7 (patch)
tree123452d12a5cf59d7a88c84b1e8a1d0aaa81578e /source4
parentfd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5 (diff)
downloadsamba-7a9ffeca21666935ba08cd909b63fc063f7607f7.tar.gz
samba-7a9ffeca21666935ba08cd909b63fc063f7607f7.tar.bz2
samba-7a9ffeca21666935ba08cd909b63fc063f7607f7.zip
check for invalid file attribute values in create
(This used to be commit dd21e3d9d788a67d4673625ed4892a875f4600dc)
Diffstat (limited to 'source4')
-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 67937324cc..cc4f0add27 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -548,6 +548,10 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
uint32_t oplock_level = OPLOCK_NONE, oplock_granted;
bool allow_level_II_oplock = false;
+ if (io->ntcreatex.in.file_attr & ~FILE_ATTRIBUTE_ALL_MASK) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
if ((io->ntcreatex.in.file_attr & FILE_ATTRIBUTE_READONLY) &&
(create_options & NTCREATEX_OPTIONS_DELETE_ON_CLOSE)) {
return NT_STATUS_CANNOT_DELETE;