[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Thu Jan 21 06:08:49 MST 2010
The branch, master has been updated
via 9b4b9d2... s3: Initialize the seqnum in "init_smb_request"
via 33e397f... s3: Make "init_smb_request" static to process.c
from fb46796... s4:rpc-server:samr: fix setting of lockout duration < lockout window
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 9b4b9d26f18a50028cbc9f593b44882b4dced809
Author: Volker Lendecke <vl at samba.org>
Date: Thu Jan 21 14:05:04 2010 +0100
s3: Initialize the seqnum in "init_smb_request"
This makes it a bit more obvious for me that the signing sequence number is
tied to the SMB request.
commit 33e397f9fde1346d4f6488128efcd6ecba06143c
Author: Volker Lendecke <vl at samba.org>
Date: Thu Jan 21 13:58:39 2010 +0100
s3: Make "init_smb_request" static to process.c
-----------------------------------------------------------------------
Summary of changes:
source3/include/proto.h | 4 ----
source3/smbd/process.c | 12 +++++-------
2 files changed, 5 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 4d5ebca..c3f0dff 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6784,10 +6784,6 @@ int srv_set_message(char *buf,
int num_words,
int num_bytes,
bool zero);
-void init_smb_request(struct smb_request *req,
- const uint8 *inbuf,
- size_t unread_bytes,
- bool encrypted);
void remove_deferred_open_smb_message(uint16 mid);
void schedule_deferred_open_smb_message(uint16 mid);
bool open_was_deferred(uint16 mid);
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 572f37d..6783308 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -366,10 +366,9 @@ static NTSTATUS receive_smb_talloc(TALLOC_CTX *mem_ctx, int fd,
* Initialize a struct smb_request from an inbuf
*/
-void init_smb_request(struct smb_request *req,
- const uint8 *inbuf,
- size_t unread_bytes,
- bool encrypted)
+static void init_smb_request(struct smb_request *req, const uint8 *inbuf,
+ size_t unread_bytes, bool encrypted,
+ uint32_t seqnum)
{
struct smbd_server_connection *sconn = smbd_server_conn;
size_t req_size = smb_len(inbuf) + 4;
@@ -383,7 +382,7 @@ void init_smb_request(struct smb_request *req,
req->flags2 = SVAL(inbuf, smb_flg2);
req->smbpid = SVAL(inbuf, smb_pid);
req->mid = SVAL(inbuf, smb_mid);
- req->seqnum = 0;
+ req->seqnum = seqnum;
req->vuid = SVAL(inbuf, smb_uid);
req->tid = SVAL(inbuf, smb_tid);
req->wct = CVAL(inbuf, smb_wct);
@@ -1416,9 +1415,8 @@ static void construct_reply(char *inbuf, int size, size_t unread_bytes,
smb_panic("could not allocate smb_request");
}
- init_smb_request(req, (uint8 *)inbuf, unread_bytes, encrypted);
+ init_smb_request(req, (uint8 *)inbuf, unread_bytes, encrypted, seqnum);
req->inbuf = (uint8_t *)talloc_move(req, &inbuf);
- req->seqnum = seqnum;
/* we popped this message off the queue - keep original perf data */
if (deferred_pcd)
--
Samba Shared Repository
More information about the samba-cvs
mailing list