SAMBA_3_0_RELEASE is setup for 3.0.23
Jeremy Allison
jra at samba.org
Thu Jun 29 21:04:18 GMT 2006
On Thu, Jun 29, 2006 at 02:58:10PM -0500, Gerald (Jerry) Carter wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jeremy Allison wrote:
>
> > W00t ! Well done Jerry !
> >
> > Ok - now this is ready, does anyone have any objections
> > to me dropping HEAD on top of SAMBA_3_0 so we can continue ?
> >
> > Give me feedback today please - if no negative
> > comments I'll try and do this tomorrow.
> >
> > Jeremy.
>
> Hold the phone. Looks like we might be breaking cups.
> I'm now seeing this in /var/log/cups/error_log
>
> E [29/Jun/2006:14:17:07 -0500] [Job 1] Error writing spool: Server
> packet had invalid SMB signature!
>
> No idea when this might have broken, but I'm retesting
> with a pristine 3_0_RELEASE tree to be sure.
I know what the problem is.
Try this patch.
Jeremy.
-------------- next part --------------
Index: libsmb/smb_signing.c
===================================================================
--- libsmb/smb_signing.c (revision 16691)
+++ libsmb/smb_signing.c (working copy)
@@ -332,7 +332,22 @@
/* cli->outbuf[smb_ss_field+2]=0;
Uncomment this to test if the remote server actually verifies signatures...*/
- data->send_seq_num += 2;
+ /* Instead of re-introducing the trans_info_conect we
+ used to have here, we use the fact that during a
+ SMBtrans/SMBtrans2/SMBnttrans send that the mid stays
+ constant. This means that calling store_sequence_for_reply()
+ will return False for all trans secondaries, as the mid is already
+ on the stored sequence list. As the send_seqence_number must
+ remain constant for all primary+secondary trans sends, we
+ only increment the send sequence number when we successfully
+ add a new entry to the outstanding sequence list. This means
+ I can isolate the fix here rather than re-adding the trans
+ signing on/off calls in libsmb/clitrans2.c JRA.
+ */
+
+ if (store_sequence_for_reply(&data->outstanding_packet_list, SVAL(outbuf,smb_mid), data->send_seq_num + 1)) {
+ data->send_seq_num += 2;
+ }
}
/***********************************************************
@@ -356,7 +371,12 @@
return False;
}
- reply_seq_number = data->send_seq_num - 1;
+ if (!get_sequence_for_reply(&data->outstanding_packet_list, SVAL(inbuf, smb_mid), &reply_seq_number)) {
+ DEBUG(1, ("client_check_incoming_message: received message "
+ "with mid %u with no matching send record.\n", (unsigned int)SVAL(inbuf, smb_mid) ));
+ return False;
+ }
+
simple_packet_signature(data, (const unsigned char *)inbuf,
reply_seq_number, calc_md5_mac);
More information about the samba-technical
mailing list