diff options
author | Samuel Cabrero <scabrero@suse.de> | 2019-02-28 13:36:09 +0100 |
---|---|---|
committer | Samuel Cabrero <scabrero@sn-devel-184> | 2020-03-20 15:36:33 +0000 |
commit | eeacac2ed63fba1795ea7cac59374c5cd9b6fea7 (patch) | |
tree | b9a5908ef71750cf81594ff36760d8ad72186f98 /source3/winbindd | |
parent | 5174e469ae06b29754252477925109d251615784 (diff) | |
download | samba-eeacac2ed63fba1795ea7cac59374c5cd9b6fea7.tar.gz |
s3:winbindd: Initialize dcesrv_context and ep servers in winbindd daemon
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index ddb4f04119a..dd8e53e29a5 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -31,8 +31,6 @@ #include "librpc/rpc/dcesrv_core.h" #include "librpc/gen_ndr/ndr_lsa_scompat.h" #include "librpc/gen_ndr/ndr_samr_scompat.h" -#include "../librpc/gen_ndr/srv_lsa.h" -#include "../librpc/gen_ndr/srv_samr.h" #include "secrets.h" #include "rpc_client/cli_netlogon.h" #include "idmap.h" @@ -50,6 +48,7 @@ #include "passdb.h" #include "lib/util/tevent_req_profile.h" #include "lib/gencache.h" +#include "rpc_server/rpc_config.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND @@ -1663,6 +1662,7 @@ int main(int argc, const char **argv) NTSTATUS status; bool ok; const struct dcesrv_endpoint_server *ep_server = NULL; + struct dcesrv_context *dce_ctx = NULL; setproctitle_init(argc, discard_const(argv), environ); @@ -1965,8 +1965,17 @@ int main(int argc, const char **argv) exit(1); } - rpc_lsarpc_init(NULL); - rpc_samr_init(NULL); + dce_ctx = global_dcesrv_context(); + + DBG_INFO("Initializing DCE/RPC registered endpoint servers\n"); + + /* Init all registered ep servers */ + status = dcesrv_init_registered_ep_servers(dce_ctx); + if (!NT_STATUS_IS_OK(status)) { + DBG_ERR("Failed to init DCE/RPC endpoint servers: %s\n", + nt_errstr(status)); + exit(1); + } winbindd_init_addrchange(NULL, global_event_context(), global_messaging_context()); |