1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3:rpc_server: Reinitialize dcesrv_context in external lsasd daemon

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Samuel Cabrero 2019-02-26 16:56:42 +01:00 committed by Samuel Cabrero
parent 80c57f238d
commit 3b52f1543c
3 changed files with 16 additions and 3 deletions

View File

@ -837,7 +837,8 @@ done:
} }
void start_lsasd(struct tevent_context *ev_ctx, void start_lsasd(struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx) struct messaging_context *msg_ctx,
struct dcesrv_context *dce_ctx)
{ {
NTSTATUS status; NTSTATUS status;
struct pf_listen_fd listen_fd[LSASD_MAX_SOCKETS]; struct pf_listen_fd listen_fd[LSASD_MAX_SOCKETS];
@ -936,6 +937,15 @@ void start_lsasd(struct tevent_context *ev_ctx,
exit(1); exit(1);
} }
DBG_INFO("Reinitializing DCE/RPC server context\n");
status = dcesrv_reinit_context(dce_ctx);
if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("Failed to reinit DCE/RPC context: %s\n",
nt_errstr(status));
exit(1);
}
ok = lsasd_create_sockets(ev_ctx, msg_ctx, listen_fd, &listen_fd_size); ok = lsasd_create_sockets(ev_ctx, msg_ctx, listen_fd, &listen_fd_size);
if (!ok) { if (!ok) {
exit(1); exit(1);

View File

@ -25,7 +25,10 @@
#include "replace.h" #include "replace.h"
#include "messages.h" #include "messages.h"
struct dcesrv_context;
void start_lsasd(struct tevent_context *ev_ctx, void start_lsasd(struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx); struct messaging_context *msg_ctx,
struct dcesrv_context *dce_ctx);
#endif #endif

View File

@ -2110,7 +2110,7 @@ extern void build_options(bool screen);
} }
if (rpc_lsasd_daemon() == RPC_DAEMON_FORK) { if (rpc_lsasd_daemon() == RPC_DAEMON_FORK) {
start_lsasd(ev_ctx, msg_ctx); start_lsasd(ev_ctx, msg_ctx, dce_ctx);
} }
if (rpc_fss_daemon() == RPC_DAEMON_FORK) { if (rpc_fss_daemon() == RPC_DAEMON_FORK) {