mirror of
https://github.com/samba-team/samba.git
synced 2025-01-17 02:05:21 +03:00
r7857: improved the handling of end-of-file on sockets in the smb server
This commit is contained in:
parent
c435843c66
commit
6ee98c5f65
@ -101,9 +101,12 @@ static NTSTATUS receive_smb_request(struct smbsrv_connection *smb_conn)
|
|||||||
if (NT_STATUS_IS_ERR(status)) {
|
if (NT_STATUS_IS_ERR(status)) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
if (nread == 0) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
if (nread == 0) {
|
||||||
|
return NT_STATUS_END_OF_FILE;
|
||||||
|
}
|
||||||
req->in.size += nread;
|
req->in.size += nread;
|
||||||
|
|
||||||
/* when we have a full NBT header, then allocate the packet */
|
/* when we have a full NBT header, then allocate the packet */
|
||||||
@ -129,9 +132,12 @@ static NTSTATUS receive_smb_request(struct smbsrv_connection *smb_conn)
|
|||||||
if (NT_STATUS_IS_ERR(status)) {
|
if (NT_STATUS_IS_ERR(status)) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
if (nread == 0) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
if (nread == 0) {
|
||||||
|
return NT_STATUS_END_OF_FILE;
|
||||||
|
}
|
||||||
|
|
||||||
req->in.size += nread;
|
req->in.size += nread;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user