int secword=0;
BOOL doencrypt = SMBENCRYPT();
time_t t = time(NULL);
+ /* We need to save and restore this as it can be destroyed
+ if we call another server if security=server
+ Thanks to Paul Nelson @ Thursby for pointing this out.
+ */
+ uint16 mid = SVAL(outbuf, smb_mid);
if (lp_security()>=SEC_USER) secword |= 1;
if (doencrypt) secword |= 2;
}
CVAL(outbuf,smb_flg) = 0x81; /* Reply, SMBlockread, SMBwritelock supported */
+ SSVAL(outbuf,smb_mid,mid); /* Restore possibly corrupted mid */
SSVAL(outbuf,smb_vwv2,max_recv);
SSVAL(outbuf,smb_vwv3,lp_maxmux()); /* maxmux */
SSVAL(outbuf,smb_vwv4,1);
int secword=0;
BOOL doencrypt = SMBENCRYPT();
time_t t = time(NULL);
+ /* We need to save and restore this as it can be destroyed
+ if we call another server if security=server
+ Thanks to Paul Nelson @ Thursby for pointing this out.
+ */
+ uint16 mid = SVAL(outbuf, smb_mid);
if (lp_security()>=SEC_USER) secword |= 1;
if (doencrypt) secword |= 2;
}
CVAL(outbuf,smb_flg) = 0x81; /* Reply, SMBlockread, SMBwritelock supported */
+ SSVAL(outbuf,smb_mid,mid); /* Restore possibly corrupted mid */
SSVAL(outbuf,smb_vwv2,max_recv);
SSVAL(outbuf,smb_vwv3,lp_maxmux());
SSVAL(outbuf,smb_vwv4,1);
int data_len;
int encrypt_len;
char challenge_len = 8;
+ /* We need to save and restore this as it can be destroyed
+ if we call another server if security=server
+ Thanks to Paul Nelson @ Thursby for pointing this out.
+ */
+ uint16 mid = SVAL(outbuf, smb_mid);
if (lp_readraw() && lp_writeraw())
{
#endif
}
+ SSVAL(outbuf,smb_mid,mid); /* Restore possibly corrupted mid */
SSVAL(outbuf,smb_vwv1+1,lp_maxmux()); /* maxmpx */
SSVAL(outbuf,smb_vwv2+1,1); /* num vcs */
SIVAL(outbuf,smb_vwv3+1,0xffff); /* max buffer. LOTS! */