Created attachment 10967 [details] patch to add support for multiplexed connections Description: ============ Samba 4 was not handling multiplexed connections properly in dcerpc server. The implementation, committed in master in caaf89e899c2a3926fb9e54d1c86f1a9cd5d7618 is adding a flag similar to DCESRV_CALL_STATE_FLAG_ASYNC to dcesrv_call_state_flags to define whether a service supports this behavior or not. Overview: ========= Microsoft Exchange is implementing a DCERPC endpoint server called async_emsmdb with a single asynchronous call named EcDoAyncWaitEx. When Outlook sends a EcDoAsyncWaitEx request, the server does not reply unless there is either a notification for Outlook to process or the timeout of 5 minutes is reached. Without this patch, Microsoft Outlook clients block and do not move further with any of the existing connections from DCERPC altered context unless the call to EcDoAsyncWaitEx actually returns. With this patch, Outlook operates properly and as expected. Scope of the patch: =================== I have identified that implementing this multiplexed connection behavior was both required when: 1. initializing a new connection, hence dcesrv_bind 2. when altering an existing context, hence dcesrv_alter. However, in this specific case we don't have existing state_flags on the connection. It is therefore necessary to save and retrieving the flags from the existing context to decide whether or not the DCERPC_PFC_FLAG_CONC_MPX should be applied to the state_flags of the current connection.
Created attachment 10972 [details] patch for v4-1 series
Comment on attachment 10972 [details] patch for v4-1 series LGTM. 4.2.x version also needed - I will attach.
Created attachment 10973 [details] git-am fix for 4.2.next. This is a direct cherry-pick from master.
Comment on attachment 10973 [details] git-am fix for 4.2.next. Jelmer please +1 for 4.2.next.
Re-assigning to Karolin for inclusion in 4.2.next, 4.1.next. Karolin, Jelmer +1'ed the bug itself rather than the attachment, but it means the same thing :-). Jeremy.
A regression/crash introduced by this patch has been identified when an unknown dcerpc endpoint is queried in dcesrv_alter. I have created a bug entry and attached a fix to address this problem: https://bugzilla.samba.org/show_bug.cgi?id=11236
Pushed to autobuild-v4-[1|2]-test.
Pushed to both branches. Closing out bug report. Thanks!