RPC calls which require writing more than 5648 bytes of data fail. This is a problem for example issuing an enumprinters call to a server with a large number of printers. Suggested fixes: From observation between windows machines, the smaller maximum PDU fragment size mentioned in rpc_dce.h (4280 bytes) is used when either machine does not offer raw pipe writing capability. Further observation indicates that in the absence of raw pipe writes, it is not permissible to split a PDU across separate WriteAndX requests. Thus in the absence of raw pipe support (which I can provide code for) the smaller MAX_PDU_FRAG_LEN should be used, and cli_write should be modified to ensure that the block size is large enough to contain the PDU fragment in its entirety. Note, I do not know the origin of the calculation in cli_write. It does not appear to correlate with anything I've observed in Windows traffic. Patch against SAMBA_3_0 CVS as of May 6: Index: include/rpc_dce.h =================================================================== RCS file: /cvsroot/samba/source/include/rpc_dce.h,v retrieving revision 1.22.2.7 diff -u -r1.22.2.7 rpc_dce.h --- include/rpc_dce.h 16 Apr 2003 15:39:57 -0000 1.22.2.7 +++ include/rpc_dce.h 6 May 2003 10:23:51 -0000 @@ -63,7 +63,8 @@ #define NETLOGON_NEG_SCHANNEL 0x40000000 /* Maximum PDU fragment size. */ -#define MAX_PDU_FRAG_LEN 0x1630 +/* #define MAX_PDU_FRAG_LEN 0x1630 */ +#define MAX_PDU_FRAG_LEN 0x10b8 /* #define MAX_PDU_FRAG_LEN 0x10b8 this is what w2k sets */ /* Index: libsmb/clireadwrite.c =================================================================== RCS file: /cvsroot/samba/source/libsmb/clireadwrite.c,v retrieving revision 1.16.2.7 diff -u -r1.16.2.7 clireadwrite.c --- libsmb/clireadwrite.c 15 Jan 2003 18:57:39 -0000 1.16.2.7 +++ libsmb/clireadwrite.c 6 May 2003 10:23:51 -0000 @@ -326,7 +326,7 @@ int issued = 0; int received = 0; int mpx = MAX(cli->max_mux-1, 1); - int block = (cli->max_xmit - (smb_size+32)) & ~1023; + int block = cli->max_xmit - (smb_size+32); int blocks = (size + (block-1)) / block; while (received < blocks) {
Waider, did jeremy apply your patch for this already?
Doesn't appear to have, no.
I have checked this code in after testing with rpcecho. Thanks Tim ! Jeremy.
originally reported against 3.0alpha23. Bugzilla spring cleaning.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.
database cleanup