diff options
-rw-r--r-- | source3/rpc_server/lsasd.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/source3/rpc_server/lsasd.c b/source3/rpc_server/lsasd.c index 9855641036..5eb0fe5617 100644 --- a/source3/rpc_server/lsasd.c +++ b/source3/rpc_server/lsasd.c @@ -644,6 +644,22 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx, goto done; } + fd = create_dcerpc_ncalrpc_socket("lsarpc"); + if (fd < 0) { + ok = false; + goto done; + } + listen_fd[*listen_fd_size] = fd; + (*listen_fd_size)++; + + rc = listen(fd, pf_lsasd_cfg.max_allowed_clients); + if (rc == -1) { + DEBUG(0, ("Failed to listen on lsarpc ncalrpc - %s\n", + strerror(errno))); + ok = false; + goto done; + } + v = dcerpc_binding_vector_dup(tmp_ctx, v_orig); if (v == NULL) { ok = false; @@ -661,6 +677,12 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx, goto done; } + status = dcerpc_binding_vector_add_unix(&ndr_table_lsarpc, v, "lsarpc"); + if (!NT_STATUS_IS_OK(status)) { + ok = false; + goto done; + } + status = rpc_ep_register(ev_ctx, msg_ctx, &ndr_table_lsarpc, v); if (!NT_STATUS_IS_OK(status)) { ok = false; @@ -684,6 +706,22 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx, listen_fd[*listen_fd_size] = fd; (*listen_fd_size)++; + fd = create_dcerpc_ncalrpc_socket("samr"); + if (fd < 0) { + ok = false; + goto done; + } + listen_fd[*listen_fd_size] = fd; + (*listen_fd_size)++; + + rc = listen(fd, pf_lsasd_cfg.max_allowed_clients); + if (rc == -1) { + DEBUG(0, ("Failed to listen on samr ncalrpc - %s\n", + strerror(errno))); + ok = false; + goto done; + } + v = dcerpc_binding_vector_dup(tmp_ctx, v_orig); if (v == NULL) { ok = false; @@ -701,6 +739,12 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx, goto done; } + status = dcerpc_binding_vector_add_unix(&ndr_table_lsarpc, v, "samr"); + if (!NT_STATUS_IS_OK(status)) { + ok = false; + goto done; + } + status = rpc_ep_register(ev_ctx, msg_ctx, &ndr_table_samr, v); if (!NT_STATUS_IS_OK(status)) { ok = false; @@ -724,6 +768,22 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx, listen_fd[*listen_fd_size] = fd; (*listen_fd_size)++; + fd = create_dcerpc_ncalrpc_socket("netlogon"); + if (fd < 0) { + ok = false; + goto done; + } + listen_fd[*listen_fd_size] = fd; + (*listen_fd_size)++; + + rc = listen(fd, pf_lsasd_cfg.max_allowed_clients); + if (rc == -1) { + DEBUG(0, ("Failed to listen on netlogon ncalrpc - %s\n", + strerror(errno))); + ok = false; + goto done; + } + v = dcerpc_binding_vector_dup(tmp_ctx, v_orig); if (v == NULL) { ok = false; @@ -741,6 +801,12 @@ static bool lsasd_create_sockets(struct tevent_context *ev_ctx, goto done; } + status = dcerpc_binding_vector_add_unix(&ndr_table_lsarpc, v, "netlogon"); + if (!NT_STATUS_IS_OK(status)) { + ok = false; + goto done; + } + status = rpc_ep_register(ev_ctx, msg_ctx, &ndr_table_netlogon, v); if (!NT_STATUS_IS_OK(status)) { ok = false; |