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 fssd daemon
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
f1eec15c37
commit
eeb6888f42
@ -41,9 +41,6 @@
|
||||
|
||||
#define DAEMON_NAME "fssd"
|
||||
|
||||
void start_fssd(struct tevent_context *ev_ctx,
|
||||
struct messaging_context *msg_ctx);
|
||||
|
||||
static void fssd_reopen_logs(void)
|
||||
{
|
||||
const struct loadparm_substitution *lp_sub =
|
||||
@ -150,7 +147,8 @@ static bool fss_init_cb(void *ptr)
|
||||
}
|
||||
|
||||
void start_fssd(struct tevent_context *ev_ctx,
|
||||
struct messaging_context *msg_ctx)
|
||||
struct messaging_context *msg_ctx,
|
||||
struct dcesrv_context *dce_ctx)
|
||||
{
|
||||
struct rpc_srv_callbacks fss_cb;
|
||||
NTSTATUS status;
|
||||
@ -210,6 +208,15 @@ void start_fssd(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);
|
||||
}
|
||||
|
||||
status = rpc_FileServerVssAgent_init(&fss_cb);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(0, ("Failed to register fssd rpc interface! (%s)\n",
|
||||
|
@ -25,7 +25,10 @@
|
||||
#include "replace.h"
|
||||
#include "messages.h"
|
||||
|
||||
struct dcesrv_context;
|
||||
|
||||
void start_fssd(struct tevent_context *ev_ctx,
|
||||
struct messaging_context *msg_ctx);
|
||||
struct messaging_context *msg_ctx,
|
||||
struct dcesrv_context *dce_ctx);
|
||||
|
||||
#endif
|
||||
|
@ -2114,7 +2114,7 @@ extern void build_options(bool screen);
|
||||
}
|
||||
|
||||
if (rpc_fss_daemon() == RPC_DAEMON_FORK) {
|
||||
start_fssd(ev_ctx, msg_ctx);
|
||||
start_fssd(ev_ctx, msg_ctx, dce_ctx);
|
||||
}
|
||||
|
||||
if (!lp__disable_spoolss() &&
|
||||
|
Loading…
Reference in New Issue
Block a user