git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7f3348
)
check for invalid file attribute values in create
author
Andrew Tridgell
<tridge@samba.org>
Thu, 22 May 2008 07:53:50 +0000
(17:53 +1000)
committer
Andrew Tridgell
<tridge@samba.org>
Thu, 22 May 2008 07:53:50 +0000
(17:53 +1000)
source/ntvfs/posix/pvfs_open.c
patch
|
blob
|
history
diff --git
a/source/ntvfs/posix/pvfs_open.c
b/source/ntvfs/posix/pvfs_open.c
index 67937324ccfa9afcae974b8232ad3eebe01624fe..cc4f0add27ccc96427b6e7f973dd21a0040517bf 100644
(file)
--- a/
source/ntvfs/posix/pvfs_open.c
+++ b/
source/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;