summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-03-22 09:11:05 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-22 17:15:13 +0100
commitd663b4c6c03450366375eb0951209bc374835935 (patch)
tree092776a3057b708f92c83e6e1be6b82cbc908671
parentfbf112bd1684acf420b104e0e7d66721af47c676 (diff)
downloadsamba-d663b4c6c03450366375eb0951209bc374835935.tar.gz
samba-d663b4c6c03450366375eb0951209bc374835935.tar.bz2
samba-d663b4c6c03450366375eb0951209bc374835935.zip
s3:smbd: disallow readbraw and writebraw if the echo handler is active
metze
-rw-r--r--source3/smbd/reply.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 082775f1ae..43af338c36 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3056,6 +3056,14 @@ void reply_readbraw(struct smb_request *req)
return;
}
+ if (smbd_server_conn->smb1.echo_handler.trusted_fde) {
+ DEBUG(2,("SMBreadbraw rejected with NOT_SUPPORTED because of"
+ "'fork echo handler = yes'\n"));
+ reply_readbraw_error();
+ END_PROFILE(SMBreadbraw);
+ return;
+ }
+
/*
* Special check if an oplock break has been issued
* and the readraw request croses on the wire, we must
@@ -3768,6 +3776,15 @@ void reply_writebraw(struct smb_request *req)
return;
}
+ if (smbd_server_conn->smb1.echo_handler.trusted_fde) {
+ DEBUG(2,("SMBwritebraw rejected with NOT_SUPPORTED because of"
+ "'fork echo handler = yes'\n"));
+ reply_nterror(req, NT_STATUS_NOT_SUPPORTED);
+ error_to_writebrawerr(req);
+ END_PROFILE(SMBwritebraw);
+ return;
+ }
+
fsp = file_fsp(req, SVAL(req->vwv+0, 0));
if (!check_fsp(conn, req, fsp)) {
error_to_writebrawerr(req);