mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3:rpc_server: Reinitialize dcesrv_context in external mdssd daemon
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
eeb6888f42
commit
80c57f238d
@ -29,6 +29,7 @@
|
||||
#include "lib/server_prefork.h"
|
||||
#include "lib/server_prefork_util.h"
|
||||
#include "librpc/rpc/dcerpc_ep.h"
|
||||
#include "librpc/rpc/dcesrv_core.h"
|
||||
|
||||
#include "rpc_server/rpc_server.h"
|
||||
#include "rpc_server/rpc_ep_register.h"
|
||||
@ -59,9 +60,6 @@ static struct pf_daemon_config default_pf_mdssd_cfg = {
|
||||
};
|
||||
static struct pf_daemon_config pf_mdssd_cfg = { 0 };
|
||||
|
||||
void start_mdssd(struct tevent_context *ev_ctx,
|
||||
struct messaging_context *msg_ctx);
|
||||
|
||||
static void mdssd_smb_conf_updated(struct messaging_context *msg,
|
||||
void *private_data,
|
||||
uint32_t msg_type,
|
||||
@ -605,7 +603,8 @@ done:
|
||||
}
|
||||
|
||||
void start_mdssd(struct tevent_context *ev_ctx,
|
||||
struct messaging_context *msg_ctx)
|
||||
struct messaging_context *msg_ctx,
|
||||
struct dcesrv_context *dce_ctx)
|
||||
{
|
||||
NTSTATUS status;
|
||||
struct pf_listen_fd listen_fd[MDSSD_MAX_SOCKETS];
|
||||
@ -672,6 +671,15 @@ void start_mdssd(struct tevent_context *ev_ctx,
|
||||
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 = mdssd_create_sockets(ev_ctx, msg_ctx, listen_fd, &listen_fd_size);
|
||||
if (!ok) {
|
||||
exit(1);
|
||||
|
@ -25,7 +25,10 @@
|
||||
#include "replace.h"
|
||||
#include "messages.h"
|
||||
|
||||
struct dcesrv_context;
|
||||
|
||||
void start_mdssd(struct tevent_context *ev_ctx,
|
||||
struct messaging_context *msg_ctx);
|
||||
struct messaging_context *msg_ctx,
|
||||
struct dcesrv_context *dce_ctx);
|
||||
|
||||
#endif
|
||||
|
@ -2129,7 +2129,7 @@ extern void build_options(bool screen);
|
||||
#ifdef WITH_SPOTLIGHT
|
||||
if ((rpc_mdssvc_mode() == RPC_SERVICE_MODE_EXTERNAL) &&
|
||||
(rpc_mdssd_daemon() == RPC_DAEMON_FORK)) {
|
||||
start_mdssd(ev_ctx, msg_ctx);
|
||||
start_mdssd(ev_ctx, msg_ctx, dce_ctx);
|
||||
}
|
||||
#endif
|
||||
} else if (!lp__disable_spoolss() &&
|
||||
|
Loading…
Reference in New Issue
Block a user