s3:mdssvc: fix service startup in deamon mode
authorRalph Boehme <slow@samba.org>
Tue, 20 Aug 2019 15:00:49 +0000 (17:00 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 9 Oct 2019 14:35:29 +0000 (14:35 +0000)
commit63cbeaf0e7472a7321f27327091217c909864100
treed68af8c1bc13527a1857cd0f96e2f8296c9ce3b3
parent78a2d95511357a5ea34473e6a6d98515b4344fb5
s3:mdssvc: fix service startup in deamon mode

Changes:

* Don't initialize the RPC service by calling setup_rpc_module() in the parent
  mdssd. This is not needed in the parent, only in the worker childs.

* In the worker childs call setup_rpc_module() instead of init_rpc_module()
  which ensures rpc_mdssvc_init() is called with the mdssvc callback which is
  needed to initialize mdssvc via mdssvc_init_cb() -> init_service_mdssvc()

* Finally rpc_setup_mdssvc() is adjusted to be a noop if mdssvc is configured to
  as external and when called by the main parent smbd via dcesrv_ep_setup() ->
  setup_rpc_modules()

I've manually tested all 4 combinations of external=yes|no X module=yes|no with
the new mdfind command.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
source3/rpc_server/mdssd.c
source3/rpc_server/mdssvc/srv_mdssvc_nt.c