r6714: We can only ask GENSEC questions if we are authenticated.
authorAndrew Bartlett <abartlet@samba.org>
Tue, 10 May 2005 16:30:51 +0000 (16:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:16:37 +0000 (13:16 -0500)
Andrew Bartlett

source/rpc_server/dcerpc_server.c

index 12e24859ec93657d99f779e9101e8f951ae27130..52da43a35e44c019f16a1f0829b635e600224797 100644 (file)
@@ -742,7 +742,9 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call)
        call->state_flags       = call->conn->dce_ctx->state_flags;
        call->time              = timeval_current();
 
-       if (!gensec_have_feature(call->conn->auth_state.gensec_security, GENSEC_FEATURE_ASYNC_REPLIES)) {
+       /* if authenticated, and the mech we use can't do async replies, don't use them... */
+       if (call->conn->auth_state.gensec_security && 
+           !gensec_have_feature(call->conn->auth_state.gensec_security, GENSEC_FEATURE_ASYNC_REPLIES)) {
                call->state_flags &= ~DCESRV_CALL_STATE_FLAG_MAY_ASYNC;
        }