1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

r3341: - don't zero the async structure (makes valgrind more useful)

- get rid of req->mid, as it isn't a safe value to use to match
  requests in the server (it is safe in the client code, as we choose
  the mid, but in the server we can't rely on other clients to choose
  the mid carefully)
(This used to be commit 938fb44351)
This commit is contained in:
Andrew Tridgell 2004-10-28 23:09:40 +00:00 committed by Gerald (Jerry) Carter
parent 479bf22c81
commit 42c4dd1832
3 changed files with 2 additions and 6 deletions

View File

@ -57,10 +57,10 @@ struct smbsrv_request *init_smb_request(struct smbsrv_connection *smb_conn)
req->async_states = talloc_p(req, struct ntvfs_async_state); req->async_states = talloc_p(req, struct ntvfs_async_state);
if (!req->async_states) { if (!req->async_states) {
talloc_free(req);
return NULL; return NULL;
} }
req->async_states->state = 0;
ZERO_STRUCTP(req->async_states);
return req; return req;
} }

View File

@ -624,7 +624,6 @@ static void construct_reply(struct smbsrv_request *req)
req->flags = CVAL(req->in.hdr, HDR_FLG); req->flags = CVAL(req->in.hdr, HDR_FLG);
req->flags2 = SVAL(req->in.hdr, HDR_FLG2); req->flags2 = SVAL(req->in.hdr, HDR_FLG2);
req->smbpid = SVAL(req->in.hdr,HDR_PID); req->smbpid = SVAL(req->in.hdr,HDR_PID);
req->mid = SVAL(req->in.hdr,HDR_MID);
if (!req_signing_check_incoming(req)) { if (!req_signing_check_incoming(req)) {
req_reply_error(req, NT_STATUS_ACCESS_DENIED); req_reply_error(req, NT_STATUS_ACCESS_DENIED);

View File

@ -89,9 +89,6 @@ struct smbsrv_request {
/* the session context is derived from the vuid */ /* the session context is derived from the vuid */
struct smbsrv_session *session; struct smbsrv_session *session;
/* the mid of this packet - used to match replies */
uint16_t mid;
/* a set of flags to control usage of the request. See REQ_CONTROL_* */ /* a set of flags to control usage of the request. See REQ_CONTROL_* */
unsigned control_flags; unsigned control_flags;