diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-10-27 16:42:44 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-10-31 19:39:02 +0100 |
commit | c7d3b6b2c38711943910aebff72b0188b0c346db (patch) | |
tree | d109de0f56db0157d9d52fc82329f03f1926f2fb /source3/smbd | |
parent | 6c2c189caafe90659a8f43d338523f0cbb0a1505 (diff) | |
download | samba-c7d3b6b2c38711943910aebff72b0188b0c346db.tar.gz samba-c7d3b6b2c38711943910aebff72b0188b0c346db.tar.bz2 samba-c7d3b6b2c38711943910aebff72b0188b0c346db.zip |
s3:smb2_server: echo the SMB2_HDR_CREDIT_CHARGE and SMB2_HDR_SIGNATURE fields
Windows just echos back the given values by default.
metze
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/smb2_server.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 84b55cce7d..5d8acc4203 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -577,7 +577,8 @@ static NTSTATUS smbd_smb2_request_setup_out(struct smbd_smb2_request *req) /* setup the SMB2 header */ SIVAL(outhdr, SMB2_HDR_PROTOCOL_ID, SMB2_MAGIC); SSVAL(outhdr, SMB2_HDR_LENGTH, SMB2_HDR_BODY); - SSVAL(outhdr, SMB2_HDR_EPOCH, 0); + SSVAL(outhdr, SMB2_HDR_CREDIT_CHARGE, + SVAL(inhdr, SMB2_HDR_CREDIT_CHARGE)); SIVAL(outhdr, SMB2_HDR_STATUS, NT_STATUS_V(NT_STATUS_INTERNAL_ERROR)); SSVAL(outhdr, SMB2_HDR_OPCODE, @@ -593,7 +594,8 @@ static NTSTATUS smbd_smb2_request_setup_out(struct smbd_smb2_request *req) IVAL(inhdr, SMB2_HDR_TID)); SBVAL(outhdr, SMB2_HDR_SESSION_ID, BVAL(inhdr, SMB2_HDR_SESSION_ID)); - memset(outhdr + SMB2_HDR_SIGNATURE, 0, 16); + memcpy(outhdr + SMB2_HDR_SIGNATURE, + inhdr + SMB2_HDR_SIGNATURE, 16); /* setup error body header */ SSVAL(outbody, 0x00, 0x08 + 1); |