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:
37c37a0
)
s3:smb2_write: reject writes to named pipes with recvfile
author
Stefan Metzmacher
<metze@samba.org>
Wed, 4 Dec 2013 14:52:40 +0000
(15:52 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Wed, 12 Mar 2014 23:04:38 +0000
(
00:04
+0100)
This looks strange but matches the SMB1 case.
We may want to clean this in a better way in both places later.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/smb2_write.c
patch
|
blob
|
history
diff --git
a/source3/smbd/smb2_write.c
b/source3/smbd/smb2_write.c
index 4e138fe6b06134fe0b41d426dbbe6a384baae35d..479a0efe278556b8858ea9a046ccbe152dd7838b 100644
(file)
--- a/
source3/smbd/smb2_write.c
+++ b/
source3/smbd/smb2_write.c
@@
-286,6
+286,14
@@
static struct tevent_req *smbd_smb2_write_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
+ if (smbreq->unread_bytes > 0) {
+ /*
+ * Note: in_data.data is NULL in this case.
+ */
+ tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ return tevent_req_post(req, ev);
+ }
+
subreq = np_write_send(state, ev,
fsp->fake_file_handle,
in_data.data,