[PATCH] Add pidhigh in the common response header

per.forlin at gmail.com per.forlin at gmail.com
Thu Apr 14 20:41:56 UTC 2016


From: Per Forlin <per.forlin at gmail.com>

The pidhigh field is required to specify larger PID than 0xFFFF.
A client sending a samba negotiation request may rely on a correct
PID in the returning response header. The client may consider the
response as invalid if the PID in the request doesn't match with
the reply. Until now only PIDs up to 0xFFFF are supported since
pidhigh has been set to 0 in the response. To resolve this issue the
PID high is added to the response header.

Signed-off-by: Per Forlin <per.forlin at gmail.com>
---
 source3/smbd/process.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 34939f0..e3c32f9 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2077,6 +2077,7 @@ static void construct_reply_common(uint8_t cmd, const uint8_t *inbuf,
 
 	SSVAL(outbuf,smb_tid,SVAL(inbuf,smb_tid));
 	SSVAL(outbuf,smb_pid,SVAL(inbuf,smb_pid));
+	SSVAL(outbuf,smb_pidhigh,SVAL(inbuf,smb_pidhigh));
 	SSVAL(outbuf,smb_uid,SVAL(inbuf,smb_uid));
 	SSVAL(outbuf,smb_mid,SVAL(inbuf,smb_mid));
 }
-- 
2.1.4




More information about the samba-technical mailing list