diff options
author | Jeremy Allison <jra@samba.org> | 2003-12-01 06:53:10 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-12-01 06:53:10 +0000 |
commit | 206464a748a59b1d485d4d3d0cb4d257d60fbd00 (patch) | |
tree | b2e63f13513a3539f56d0f2fe930e8086976db21 | |
parent | 4e73faa7b4af7f73bdce9fcc2ee1825249dc7da7 (diff) | |
download | samba-206464a748a59b1d485d4d3d0cb4d257d60fbd00.tar.gz samba-206464a748a59b1d485d4d3d0cb4d257d60fbd00.tar.xz samba-206464a748a59b1d485d4d3d0cb4d257d60fbd00.zip |
Ensure the server can cope with multiple secondary trans
requests when signing is turned on.
Jeremy.
-rw-r--r-- | source/smbd/ipc.c | 8 | ||||
-rw-r--r-- | source/smbd/nttrans.c | 8 | ||||
-rw-r--r-- | source/smbd/trans2.c | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c index 86d982b0227..dd92cc4e4d5 100644 --- a/source/smbd/ipc.c +++ b/source/smbd/ipc.c @@ -445,6 +445,7 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int of the parameter/data bytes */ outsize = set_message(outbuf,0,0,True); show_msg(outbuf); + srv_signing_trans_stop(); if (!send_smb(smbd_server_fd(),outbuf)) exit_server("reply_trans: send_smb failed."); } @@ -456,6 +457,13 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int ret = receive_next_smb(inbuf,bufsize,SMB_SECONDARY_WAIT); + /* + * The sequence number for the trans reply is always + * based on the last secondary received. + */ + + srv_signing_trans_start(SVAL(inbuf,smb_mid)); + if ((ret && (CVAL(inbuf, smb_com) != SMBtranss)) || !ret) { if(ret) { DEBUG(0,("reply_trans: Invalid secondary trans packet\n")); diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index 80297daaef3..767df0b7251 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -2488,6 +2488,7 @@ due to being in oplock break state.\n", (unsigned int)function_code )); /* We need to send an interim response then receive the rest of the parameter/data bytes */ outsize = set_message(outbuf,0,0,True); + srv_signing_trans_stop(); if (!send_smb(smbd_server_fd(),outbuf)) exit_server("reply_nttrans: send_smb failed."); @@ -2498,6 +2499,13 @@ due to being in oplock break state.\n", (unsigned int)function_code )); ret = receive_next_smb(inbuf,bufsize,SMB_SECONDARY_WAIT); + /* + * The sequence number for the trans reply is always + * based on the last secondary received. + */ + + srv_signing_trans_start(SVAL(inbuf,smb_mid)); + if((ret && (CVAL(inbuf, smb_com) != SMBnttranss)) || !ret) { outsize = set_message(outbuf,0,0,True); if(ret) { diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 56d1aae3a2a..525b0153791 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -3523,6 +3523,7 @@ int reply_trans2(connection_struct *conn, /* We need to send an interim response then receive the rest of the parameter/data bytes */ outsize = set_message(outbuf,0,0,True); + srv_signing_trans_stop(); if (!send_smb(smbd_server_fd(),outbuf)) exit_server("reply_trans2: send_smb failed."); @@ -3536,6 +3537,13 @@ int reply_trans2(connection_struct *conn, ret = receive_next_smb(inbuf,bufsize,SMB_SECONDARY_WAIT); + /* + * The sequence number for the trans reply is always + * based on the last secondary received. + */ + + srv_signing_trans_start(SVAL(inbuf,smb_mid)); + if ((ret && (CVAL(inbuf, smb_com) != SMBtranss2)) || !ret) { outsize = set_message(outbuf,0,0,True); |