From: Jeremy Allison Date: Sun, 30 Nov 2003 19:40:53 +0000 (+0000) Subject: Fix signing bug with secondary client trans requests. Turns out the last X-Git-Tag: samba-3.0.1rc1~5^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=315f25fc1710e20051414bbf084cb5648129c3bb;p=thirdparty%2Fsamba.git Fix signing bug with secondary client trans requests. Turns out the last packet is the one that matters for checking the signing replies. Need to check the server code does this correctly too.... Bug #832 reported by Volker. Jeremy. --- diff --git a/source/libsmb/clitrans.c b/source/libsmb/clitrans.c index 92c1cc99eeb..3eb7fcc2168 100644 --- a/source/libsmb/clitrans.c +++ b/source/libsmb/clitrans.c @@ -134,6 +134,16 @@ BOOL cli_send_trans(struct cli_state *cli, int trans, * the primary. Important in signing. JRA. */ cli->mid = mid; + /* + * Turns out that we need to increment the + * sequence number for each packet until the + * last one in the signing sequence. That's + * the one that matters to check signing replies. JRA. + */ + + cli_signing_trans_stop(cli); + cli_signing_trans_start(cli); + show_msg(cli->outbuf); if (!cli_send_smb(cli)) { cli_signing_trans_stop(cli); @@ -427,6 +437,16 @@ BOOL cli_send_nt_trans(struct cli_state *cli, * the primary. Important in signing. JRA. */ cli->mid = mid; + /* + * Turns out that we need to increment the + * sequence number for each packet until the + * last one in the signing sequence. That's + * the one that matters to check signing replies. JRA. + */ + + cli_signing_trans_stop(cli); + cli_signing_trans_start(cli); + show_msg(cli->outbuf); if (!cli_send_smb(cli)) {