mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
s3-rpc_server: Start the Endpoint Mapper Dameon if enabled.
Endpoint Mapper is still disabled by default! Signed-off-by: Günther Deschner <gd@samba.org>
This commit is contained in:
parent
55296edb09
commit
bd66fc81b6
@ -61,12 +61,12 @@ static uint16_t _open_sockets(struct tevent_context *ev_ctx,
|
||||
uint16_t p = 0;
|
||||
const char *rpcsrv_type;
|
||||
|
||||
/* TODO: Remove this if we enable epmapper */
|
||||
rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
|
||||
"rpc_server", "epmapper",
|
||||
"rpc_server",
|
||||
"epmapper",
|
||||
"none");
|
||||
if (StrCaseCmp(rpcsrv_type, "none") == 0) {
|
||||
return 1;
|
||||
return (uint16_t) -1;
|
||||
}
|
||||
|
||||
if (lp_interfaces() && lp_bind_interfaces_only()) {
|
||||
@ -135,7 +135,8 @@ static NTSTATUS _rpc_ep_register(struct tevent_context *ev_ctx,
|
||||
|
||||
/* start endpoint mapper only if enabled */
|
||||
rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
|
||||
"rpc_server", "epmapper",
|
||||
"rpc_server",
|
||||
"epmapper",
|
||||
"none");
|
||||
if (StrCaseCmp(rpcsrv_type, "none") == 0) {
|
||||
return NT_STATUS_OK;
|
||||
@ -168,7 +169,8 @@ static NTSTATUS _rpc_ep_unregister(const struct ndr_interface_table *iface)
|
||||
|
||||
/* start endpoint mapper only if enabled */
|
||||
rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
|
||||
"rpc_server", "epmapper",
|
||||
"rpc_server",
|
||||
"epmapper",
|
||||
"none");
|
||||
if (StrCaseCmp(rpcsrv_type, "none") == 0) {
|
||||
return NT_STATUS_OK;
|
||||
@ -600,7 +602,8 @@ bool dcesrv_ep_setup(struct tevent_context *ev_ctx,
|
||||
|
||||
/* start endpoint mapper only if enabled */
|
||||
rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
|
||||
"rpc_server", "epmapper",
|
||||
"rpc_server",
|
||||
"epmapper",
|
||||
"none");
|
||||
if (StrCaseCmp(rpcsrv_type, "embedded") == 0) {
|
||||
epmapper_cb.init = epmapper_init_cb;
|
||||
|
@ -37,6 +37,9 @@
|
||||
#include "printing.h"
|
||||
#include "serverid.h"
|
||||
|
||||
extern void start_epmd(struct tevent_context *ev_ctx,
|
||||
struct messaging_context *msg_ctx);
|
||||
|
||||
#ifdef WITH_DFS
|
||||
extern int dcelogin_atmost_once;
|
||||
#endif /* WITH_DFS */
|
||||
@ -1208,6 +1211,18 @@ extern void build_options(bool screen);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (is_daemon && !interactive) {
|
||||
const char *rpcsrv_type;
|
||||
|
||||
rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
|
||||
"rpc_server", "epmapper",
|
||||
"none");
|
||||
if (StrCaseCmp(rpcsrv_type, "daemon") == 0) {
|
||||
start_epmd(smbd_event_context(),
|
||||
smbd_server_conn->msg_ctx);
|
||||
}
|
||||
}
|
||||
|
||||
if (!dcesrv_ep_setup(smbd_event_context(), smbd_server_conn->msg_ctx)) {
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user