diff options
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/service_rpc.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/source4/rpc_server/service_rpc.c b/source4/rpc_server/service_rpc.c index 00f0d261ca..b68cec4c7d 100644 --- a/source4/rpc_server/service_rpc.c +++ b/source4/rpc_server/service_rpc.c @@ -104,20 +104,24 @@ static void dcesrv_sock_accept(struct stream_connection *srv_conn) struct dcesrv_socket_context *dcesrv_sock = talloc_get_type(srv_conn->private, struct dcesrv_socket_context); struct dcesrv_connection *dcesrv_conn = NULL; - struct auth_session_info *session_info = NULL; - status = auth_anonymous_session_info(srv_conn, srv_conn->event.ctx, dcesrv_sock->dcesrv_ctx->lp_ctx, &session_info); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0,("dcesrv_sock_accept: auth_anonymous_session_info failed: %s\n", - nt_errstr(status))); - stream_terminate_connection(srv_conn, nt_errstr(status)); - return; + if (!srv_conn->session_info) { + status = auth_anonymous_session_info(srv_conn, + srv_conn->event.ctx, + srv_conn->lp_ctx, + &srv_conn->session_info); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0,("dcesrv_sock_accept: auth_anonymous_session_info failed: %s\n", + nt_errstr(status))); + stream_terminate_connection(srv_conn, nt_errstr(status)); + return; + } } status = dcesrv_endpoint_connect(dcesrv_sock->dcesrv_ctx, srv_conn, dcesrv_sock->endpoint, - session_info, + srv_conn->session_info, srv_conn->event.ctx, srv_conn->msg_ctx, srv_conn->server_id, |