1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/source3/rpc_server/wscript_build
Volker Lendecke 3ca7c640da s3:rpc_server: Add samba-dcerpcd
Central dispatcher for incoming RPC requests, supported by helpers
that implement RPC services.

Upon startup, it asks all helpers which interfaces and endpoints to
listen on so it doesn't interfere with the samba binary when we're
configured as an Active Directory Domain Controller, then samba-dcerpcd
opens the relevant sockets. Once clients connect, start required helpers
and tell them to shut down once idle for a while.

Can be started as a full standalone daemon without smbd involved or as
a helper daemon started on demand by smbd or winbind or other local
processes trying to connect to a named pipe based RPC service.

NB. To start as a standalone daemon the smb.conf [global] option
"rpc start on demand helpers = false" must be set.
By default "rpc start on demand helpers = true"
in order to allow upgrades without needing an smb.conf change.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-12-10 14:02:30 +00:00

228 lines
7.6 KiB
Python

#!/usr/bin/env python
### RPC_SERVER
bld.SAMBA3_SUBSYSTEM('rpc',
source='',
deps='dcerpc-server-core')
bld.SAMBA_BINARY('samba-dcerpcd',
source='rpc_host.c',
deps='''
samba3core
CMDLINE_S3
dcerpc-binding
npa_tstream
AUTH_COMMON
RPC_SOCK_HELPER
NDR_RPC_HOST
RPC_SERVER
''',
install_path='${SAMBA_LIBEXECDIR}')
bld.SAMBA3_SUBSYSTEM('RPC_CONFIG',
source='rpc_config.c',
deps='talloc')
bld.SAMBA3_SUBSYSTEM('RPC_NCACN_NP',
source='rpc_ncacn_np.c rpc_handles.c',
deps='RPC_CONFIG auth common_auth npa_tstream')
bld.SAMBA3_SUBSYSTEM('RPC_SERVER_LOOP',
source='rpc_server.c',
deps='samba-util')
bld.SAMBA3_SUBSYSTEM('SRV_ACCESS_CHECK',
source='srv_access_check.c',
deps='samba-util')
bld.SAMBA3_SUBSYSTEM('RPC_SERVER',
source='srv_pipe_hnd.c srv_pipe.c',
deps='''
dcerpc-server-core
RPC_CONFIG
RPC_NCACN_NP
RPC_SERVER_LOOP
NDR_NAMED_PIPE_AUTH
''')
bld.SAMBA3_SUBSYSTEM('RPC_MODULES',
source='rpc_modules.c',
deps='samba-util')
### RPC_SERVICES
bld.SAMBA3_SUBSYSTEM('RPC_DSSETUP',
source='''dssetup/srv_dssetup_nt.c''',
deps='samba-util')
bld.SAMBA3_SUBSYSTEM('RPC_EPMAPPER',
source='''epmapper/srv_epmapper.c''',
deps='samba-util')
bld.SAMBA3_SUBSYSTEM('RPC_FSS_STATE',
source='''fss/srv_fss_state.c''',
deps='samba-util NDR_FSRVP_STATE')
bld.SAMBA3_SUBSYSTEM('RPC_FSS_AGENT',
source='''fss/srv_fss_agent.c''',
deps='samba-util RPC_FSS_STATE')
bld.SAMBA3_SUBSYSTEM('RPC_EVENTLOG',
source='''eventlog/srv_eventlog_nt.c
eventlog/srv_eventlog_reg.c''',
deps='LIBEVENTLOG LIBCLI_WINREG_INTERNAL')
bld.SAMBA3_SUBSYSTEM('RPC_INITSHUTDOWN',
source='''initshutdown/srv_initshutdown_nt.c''',
deps='samba-util')
bld.SAMBA3_SUBSYSTEM('RPC_LSARPC',
source='''lsa/srv_lsa_nt.c''',
deps='SRV_ACCESS_CHECK LIBLSA GNUTLS_HELPERS')
bld.SAMBA3_SUBSYSTEM('RPC_NETDFS',
source='''dfs/srv_dfs_nt.c''',
deps='samba-util')
bld.SAMBA3_SUBSYSTEM('RPC_NETLOGON',
source='''netlogon/srv_netlog_nt.c''',
deps='LIBCLI_AUTH')
bld.SAMBA3_SUBSYSTEM('RPC_NTSVCS',
source='''ntsvcs/srv_ntsvcs_nt.c''',
deps='samba-util')
bld.SAMBA3_SUBSYSTEM('RPC_RPCECHO',
source='''echo/srv_echo_nt.c''',
deps='samba-util')
bld.SAMBA3_SUBSYSTEM('RPC_SAMR',
source='''samr/srv_samr_nt.c
samr/srv_samr_util.c
samr/srv_samr_chgpasswd.c''',
deps='PLAINTEXT_AUTH SRV_ACCESS_CHECK DCERPC_HELPER')
bld.SAMBA3_SUBSYSTEM('RPC_SPOOLSS',
source='''spoolss/srv_spoolss_nt.c
spoolss/srv_spoolss_util.c''',
deps='PRINTING PRINTBACKEND LIBCLI_WINREG_INTERNAL')
bld.SAMBA3_SUBSYSTEM('RPC_IREMOTEWINSPOOL',
source='''
spoolss/srv_iremotewinspool_nt.c
spoolss/srv_iremotewinspool.c
''',
deps='RPC_SPOOLSS')
bld.SAMBA3_SUBSYSTEM('RPC_SRVSVC',
source='''srvsvc/srv_srvsvc_nt.c''',
deps='samba-util tdb')
bld.SAMBA3_SUBSYSTEM('RPC_SVCCTL',
source='''svcctl/srv_svcctl_nt.c
svcctl/srv_svcctl_reg.c''',
deps='SERVICES LIBCLI_WINREG_INTERNAL')
bld.SAMBA3_SUBSYSTEM('RPC_WINREG',
source='''winreg/srv_winreg_nt.c''',
deps='REG_FULL REGFIO NDR_PERFCOUNT')
bld.SAMBA3_SUBSYSTEM('RPC_WKSSVC',
source='''wkssvc/srv_wkssvc_nt.c''',
deps='LIBNET')
bld.SAMBA3_SUBSYSTEM('mdssvc',
source='''
mdssvc/dalloc.c
mdssvc/marshalling.c
''')
rpc_mdssvc_sources = '''
mdssvc/mdssvc.c
mdssvc/mdssvc_noindex.c
mdssvc/srv_mdssvc_nt.c
'''
rpc_mdssvc_deps = 'mdssvc samba-util smbd_base '
if bld.env.spotlight_backend_tracker:
rpc_mdssvc_sources += '''
mdssvc/mdssvc_tracker.c
mdssvc/sparql_mapping.c
mdssvc/sparql_parser.y
mdssvc/sparql_lexer.l
'''
rpc_mdssvc_deps += 'tevent-glib-glue ' + bld.env['libtracker']
if bld.env.spotlight_backend_es:
rpc_mdssvc_sources += '''
mdssvc/mdssvc_es.c
mdssvc/es_mapping.c
mdssvc/es_parser.y
mdssvc/es_lexer.l
'''
rpc_mdssvc_deps += ' http jansson'
if bld.SAMBA3_IS_ENABLED_MODULE('rpc_mdssvc_module'):
bld.INSTALL_FILES(bld.env.SAMBA_DATADIR,
'mdssvc/elasticsearch_mappings.json')
bld.SAMBA3_MODULE('rpc_mdssvc_module',
subsystem='rpc',
source=rpc_mdssvc_sources,
init_function='',
deps=rpc_mdssvc_deps,
internal_module=bld.SAMBA3_IS_STATIC_MODULE('rpc_mdssvc_module'),
enabled=bld.SAMBA3_IS_ENABLED_MODULE('rpc_mdssvc_module'))
# RPC_SERVICE
bld.SAMBA3_SUBSYSTEM('RPC_SERVER_REGISTER',
source='rpc_ep_register.c ../librpc/rpc/dcerpc_ep.c',
deps='samba-util')
bld.SAMBA3_SUBSYSTEM('RPC_SERVICE',
source='rpc_service_setup.c',
deps='''
rpc
RPC_SERVER
RPC_SERVER_REGISTER
RPC_MODULES
RPC_SAMR
RPC_LSARPC
RPC_WINREG
RPC_INITSHUTDOWN
RPC_DSSETUP
RPC_WKSSVC
RPC_SVCCTL
RPC_NTSVCS
RPC_NETLOGON
RPC_NETDFS
RPC_SRVSVC
RPC_SPOOLSS
RPC_IREMOTEWINSPOOL
RPC_EVENTLOG
RPC_RPCECHO
RPC_SERVER
RPC_EPMAPPER
RPC_FSS_AGENT
''')
# RPC_DAEMONS
bld.SAMBA3_SUBSYSTEM('RPC_SOCK_HELPER',
source='rpc_sock_helper.c',
deps='RPC_SERVER_REGISTER')
bld.SAMBA3_SUBSYSTEM('EPMD',
source='epmd.c',
deps='samba-util')
bld.SAMBA3_SUBSYSTEM('LSASD',
source='lsasd.c',
deps='RPC_SOCK_HELPER samba-util')
bld.SAMBA3_SUBSYSTEM('FSSD',
source='fssd.c',
deps='samba-util')
bld.SAMBA3_SUBSYSTEM('MDSSD',
source='mdssd.c',
deps='RPC_SOCK_HELPER RPC_MODULES samba-util tevent-glib-glue',
enabled=bld.env.with_spotlight)