summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-05-17 02:40:37 +0200
committerStefan Metzmacher <metze@samba.org>2008-07-07 21:42:10 +0200
commit2cb149b0b3dfce4a036956ba7d575af5bc144cc4 (patch)
treeaaf210d0581c90e97b5afb71acab7d9b76350538
parent8350a230939dbb734a6c4b9ffa665421f8f05821 (diff)
downloadsamba-2cb149b0b3dfce4a036956ba7d575af5bc144cc4.tar.gz
samba-2cb149b0b3dfce4a036956ba7d575af5bc144cc4.tar.bz2
samba-2cb149b0b3dfce4a036956ba7d575af5bc144cc4.zip
rpc_server: use the transport session_info if available
metze (This used to be commit 76dd521bcf53a245bd1412968e9b921e5c2f10c9)
-rw-r--r--source4/rpc_server/service_rpc.c20
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,