summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-09-24 17:45:48 -0700
committerAndrew Tridgell <tridge@samba.org>2008-09-24 18:10:23 -0700
commiteb5b3f50d17dfca198304d636033ad93410d570f (patch)
tree25d82126a166d195633de2959fd12fc3b4332680
parent5a5e2df5694c5dc1be2692e8547370bcdfc58ad0 (diff)
downloadsamba-eb5b3f50d17dfca198304d636033ad93410d570f.tar.gz
samba-eb5b3f50d17dfca198304d636033ad93410d570f.tar.bz2
samba-eb5b3f50d17dfca198304d636033ad93410d570f.zip
we should terminate the connection on a bad negprot packet size
-rw-r--r--source4/smb_server/smb2/negprot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/smb_server/smb2/negprot.c b/source4/smb_server/smb2/negprot.c
index d64b36d659..49a2d12ef4 100644
--- a/source4/smb_server/smb2/negprot.c
+++ b/source4/smb_server/smb2/negprot.c
@@ -192,7 +192,7 @@ void smb2srv_negprot_recv(struct smb2srv_request *req)
enum ndr_err_code ndr_err;
if (req->in.body_size < 0x26) {
- smb2srv_send_error(req, NT_STATUS_FOOBAR);
+ smbsrv_terminate_connection(req->smb_conn, "Bad body size in SMB2 negprot");
return;
}
@@ -209,7 +209,7 @@ void smb2srv_negprot_recv(struct smb2srv_request *req)
io->in.capabilities = IVAL(req->in.body, 0x08);
ndr_err = smbcli_pull_guid(req->in.body, 0xC, &io->in.client_guid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- smbsrv_terminate_connection(req->smb_conn, nt_errstr(NT_STATUS_FOOBAR));
+ smbsrv_terminate_connection(req->smb_conn, "Bad GUID in SMB2 negprot");
talloc_free(req);
return;
}