summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-26 15:02:43 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-26 15:02:43 +1000
commit2ad2bdda89c07c0b8ce754c3b0cd4664eefc697d (patch)
treee64ea5fc962b58a0e74954d3df5ad9ffb3357f7e /source4/smb_server
parentcf4899cf4cb3432384034211eaa57e8059c24afb (diff)
downloadsamba-2ad2bdda89c07c0b8ce754c3b0cd4664eefc697d.tar.gz
samba-2ad2bdda89c07c0b8ce754c3b0cd4664eefc697d.tar.bz2
samba-2ad2bdda89c07c0b8ce754c3b0cd4664eefc697d.zip
stricter checks for valid inputs in SMB2 open and lock
(This used to be commit a7b5689a73adde59de28770aa3949660441291ea)
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb/reply.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/smb_server/smb/reply.c b/source4/smb_server/smb/reply.c
index 40cad91062..d28f4b6072 100644
--- a/source4/smb_server/smb/reply.c
+++ b/source4/smb_server/smb/reply.c
@@ -2193,6 +2193,11 @@ void smbsrv_reply_ntcreate_and_X(struct smbsrv_request *req)
io->ntcreatex.in.ea_list = NULL;
io->ntcreatex.in.sec_desc = NULL;
+ /* we use a couple of bits of the create options internally */
+ if (io->ntcreatex.in.create_options & NTCREATEX_OPTIONS_PRIVATE_MASK) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
/* we need a neater way to handle this alignment */
if ((req->flags2 & FLAGS2_UNICODE_STRINGS) &&
ucs2_align(req->in.buffer, req->in.data, STR_TERMINATE|STR_UNICODE)) {