Hi Milan, Sorry for the long delay.
This issue hits openchange since May 2012. More specifically and regardless of server provisioning issues which you don't really have to worry about for libmapi, you have to revert the following git commit in samba4 tree: http://gitweb.samba.org/?p=samba.git;a=commitdiff;h=035342c11719d1daa647c0b2ae7cec27a969f83a I'm currently working on a longer term work around, but this may require time before I have something workable. In the meanwhile, if you find a better fix, I'll apply it with pleasure. Cheers, Julien. On Fri, 2012-10-26 at 13:41 +0200, Milan Crha wrote: > On Thu, 2012-10-25 at 18:40 +0200, Milan Crha wrote: > > On Mon, 2012-08-27 at 15:09 +0200, Milan Crha wrote: > > > This error is new in 1.0, and can be reproduced with openchangeclient, > > > if the passed-in message body is larger than 4KB, but the > > > openchangeclient pretends success, while message itself, when delivered, > > > is missing body. When run with debugging, the log also shows > > > rpc fault: WERR_RPC_X_BAD_STUB_DATA > > > error. I tried the same with OpenChange 0.11 and it works fine there. > > > > I made more tests today and it turned out that the problem is elsewhere, > > in samba4. I built OpenChange 1.0 against samba4-alpha16 and I can send > > long emails there, same as with alpha17, but if I use alpha18 or any > > later version of samba4, including beta8, then the WriteStream fails. > > > > I compared raw bytes being sent to the server, and the wrong samba4 > > sends on byte more than the working samba4. The three bytes for the > > request (opnum, logon_id, handle_idx) are written as expected, then is > > written one byte more, a 0, then the rest continues as expected (the > > stream data). > > > > I asked for help samba folks, thus we'll see whether they'll fix this in > > beta9 or any later version. > > Hi, > final update on this. The reason of breakage in WriteStream is because > of samba4 change in LIBNDR_ALIGN_FLAGS. While it used to be: > (LIBNDR_FLAG_ALIGN2|LIBNDR_FLAG_ALIGN4|LIBNDR_FLAG_ALIGN8) > it is now: > LIBNDR_FLAG_NOALIGN | \ > LIBNDR_FLAG_REMAINING | \ > LIBNDR_FLAG_ALIGN2 | \ > LIBNDR_FLAG_ALIGN4 | \ > LIBNDR_FLAG_ALIGN8 > and when the ndr_push_WriteStream_req was calling > ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); > the previously set flag about NOALIGN was removed, hence during > ndr_push_subcontext_end() call was adding one byte of padding, to be > on 2 byte align from 5 to 6 in ndr->offset. > > I checked OpenChange's exchange.idl and some usages of NDR_REMAINING are > already adding NDR_NOALIGN to itself, thus I added it into those > missing, which fixes the issue (WriteStream is one of affected). > > I would add the patch into tracker, but the site doesn't respond to me > currently, thus I'm sending it at least here. > Bye, > Milan > _______________________________________________ > devel mailing list > devel@lists.openchange.org > http://mailman.openchange.org/listinfo/devel
signature.asc
Description: This is a digitally signed message part
_______________________________________________ devel mailing list devel@lists.openchange.org http://mailman.openchange.org/listinfo/devel