2010-03-28 01:48:49 +03:00
#!/usr/bin/env python
2024-04-09 06:07:23 +03:00
# We do this because we do not want to depend on the KDC, only find and use its header files. We do not want
2014-02-21 01:20:52 +04:00
if not bld.CONFIG_SET("USING_SYSTEM_KDC"):
2022-01-19 15:15:45 +03:00
kdc_include = "../../third_party/heimdal/kdc ../../third_party/heimdal/lib/gssapi"
2014-02-21 01:20:52 +04:00
else:
kdc_include = getattr(bld.env, "CPPPATH_KDC")
2016-09-08 10:46:52 +03:00
if bld.CONFIG_SET('SAMBA4_USES_HEIMDAL'):
bld.SAMBA_MODULE('service_kdc',
source='kdc-heimdal.c',
subsystem='service',
init_function='server_service_kdc_init',
deps='''
kdc
HDB_SAMBA4
WDC_SAMBA4
samba-hostconfig
com_err
samba_server_gensec
PAC_GLUE
KDC-GLUE
KDC-SERVER
KPASSWD-SERVICE
KPASSWD_GLUE
''',
internal_module=False)
if bld.CONFIG_GET('SAMBA_USES_MITKDC'):
bld.SAMBA_MODULE('service_kdc',
source='kdc-service-mit.c',
2021-10-04 14:02:35 +03:00
cflags_end='-Wno-strict-prototypes',
2016-09-08 10:46:52 +03:00
subsystem='service',
init_function='server_service_mitkdc_init',
deps='''
samba-hostconfig
service
talloc
UTIL_RUNCMD
2016-09-08 10:56:37 +03:00
MIT_KDC_IRPC
2016-09-08 10:58:44 +03:00
KDC-SERVER
KPASSWD-SERVICE
com_err
kadm5srv_mit
kdb5
2016-09-08 10:46:52 +03:00
''',
internal_module=False)
2010-03-17 14:07:42 +03:00
2011-11-30 00:45:25 +04:00
bld.SAMBA_LIBRARY('HDB_SAMBA4',
source='hdb-samba4.c hdb-samba4-plugin.c',
2022-03-02 00:00:17 +03:00
deps='ldb auth4_sam common_auth samba-credentials hdb kdc db-glue samba-hostconfig com_err sdb_hdb RPC_NDR_WINBIND',
2014-02-21 01:20:52 +04:00
includes=kdc_include,
2014-05-08 17:15:40 +04:00
private_library=True,
enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL')
2011-11-30 00:45:25 +04:00
)
2010-03-17 14:07:42 +03:00
2011-11-30 00:45:25 +04:00
# A plugin for Heimdal's kadmin for users who need to operate that tool
bld.SAMBA_LIBRARY('HDB_SAMBA4_PLUGIN',
source='hdb-samba4-plugin.c',
deps='hdb HDB_SAMBA4 samba-util samba-hostconfig ',
link_name='modules/hdb/hdb_samba4.so',
realname='hdb_samba4.so',
install_path='${MODULESDIR}/hdb',
2011-12-07 04:43:01 +04:00
enabled = (bld.CONFIG_SET("USING_SYSTEM_KRB5") and bld.CONFIG_SET("USING_SYSTEM_HDB"))
2011-11-30 00:45:25 +04:00
)
2010-03-17 14:07:42 +03:00
2016-06-10 12:29:20 +03:00
bld.SAMBA_SUBSYSTEM('KDC-SERVER',
source='kdc-server.c kdc-proxy.c',
deps='''
krb5samba
ldb
LIBTSOCKET
LIBSAMBA_TSOCKET
2016-09-07 13:32:50 +03:00
''')
2016-06-10 12:29:20 +03:00
2016-09-07 17:03:15 +03:00
kpasswd_flavor_src = 'kpasswd-service.c kpasswd-helper.c'
if bld.CONFIG_SET('SAMBA4_USES_HEIMDAL'):
kpasswd_flavor_src = kpasswd_flavor_src + ' kpasswd-service-heimdal.c'
2016-09-08 10:58:44 +03:00
elif bld.CONFIG_GET('SAMBA_USES_MITKDC'):
kpasswd_flavor_src = kpasswd_flavor_src + ' kpasswd-service-mit.c'
2016-09-07 17:03:15 +03:00
2016-09-07 13:32:14 +03:00
bld.SAMBA_SUBSYSTEM('KPASSWD-SERVICE',
2016-09-07 17:03:15 +03:00
source=kpasswd_flavor_src,
2016-09-07 13:32:14 +03:00
deps='''
krb5samba
samba_server_gensec
KPASSWD_GLUE
2022-05-18 07:52:41 +03:00
gensec_krb5_helpers
2016-09-07 13:32:14 +03:00
''')
2014-05-12 12:21:18 +04:00
bld.SAMBA_SUBSYSTEM('KDC-GLUE',
source='kdc-glue.c',
includes=kdc_include,
deps='hdb PAC_GLUE',
enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL')
)
2010-03-17 14:07:42 +03:00
bld.SAMBA_SUBSYSTEM('WDC_SAMBA4',
source='wdc-samba4.c',
2014-02-21 01:20:52 +04:00
includes=kdc_include,
2023-06-16 05:49:11 +03:00
deps='ldb auth4_sam common_auth samba-credentials hdb PAC_GLUE samba-hostconfig com_err KDC-GLUE authn_policy_util',
2014-05-08 17:15:40 +04:00
enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL')
2010-03-17 14:07:42 +03:00
)
2014-05-07 18:52:42 +04:00
bld.SAMBA_SUBSYSTEM('sdb',
source='sdb.c',
2015-08-04 13:00:33 +03:00
deps='talloc krb5',
2014-05-07 18:52:42 +04:00
)
2014-05-08 19:09:08 +04:00
bld.SAMBA_SUBSYSTEM('sdb_hdb',
source='sdb_to_hdb.c',
2015-08-04 13:00:33 +03:00
deps='talloc sdb hdb',
2014-05-08 19:09:08 +04:00
autoproto='sdb_hdb.h',
enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL')
)
2010-03-17 14:07:42 +03:00
2014-05-09 15:45:19 +04:00
bld.SAMBA_SUBSYSTEM('sdb_kdb',
source='sdb_to_kdb.c',
deps='sdb kdb5',
autoproto='sdb_kdb.h',
enabled=bld.CONFIG_SET('HAVE_KDB_H')
)
2010-03-17 14:07:42 +03:00
bld.SAMBA_SUBSYSTEM('PAC_GLUE',
2023-05-09 02:57:09 +03:00
source='pac-glue.c pac-blobs.c',
2023-06-16 02:20:04 +03:00
deps='ldb auth4_sam common_auth samba-credentials samba-hostconfig com_err ad_claims authn_policy authn_policy_util'
2010-03-17 14:07:42 +03:00
)
2010-10-29 04:48:06 +04:00
bld.SAMBA_LIBRARY('pac',
2010-11-07 04:05:51 +03:00
source=[],
deps='PAC_GLUE',
private_library=True,
grouping_library=True)
2010-10-29 04:48:06 +04:00
2010-03-17 14:07:42 +03:00
2010-10-24 22:26:09 +04:00
bld.SAMBA_LIBRARY('db-glue',
2010-03-17 14:07:42 +03:00
source='db-glue.c',
2024-05-21 02:14:50 +03:00
deps='ldb auth4_sam common_auth samba-credentials sdb samba-hostconfig com_err RPC_NDR_IRPC MESSAGING PAC_GLUE authn_policy_util samdb-common',
2011-03-19 02:43:50 +03:00
private_library=True,
2010-03-17 14:07:42 +03:00
)
2023-03-02 23:17:39 +03:00
bld.SAMBA_LIBRARY('ad_claims',
source='ad_claims.c',
2023-03-28 05:10:50 +03:00
deps='ldb samba-util samdb dsdb-module authn_policy_util',
2023-03-02 23:17:39 +03:00
private_library=True,
)
2023-05-04 01:59:49 +03:00
bld.SAMBA_LIBRARY('authn_policy_util',
source='authn_policy_util.c',
deps='authn_policy samdb dsdb-module',
private_library=True,
)
2014-08-05 19:49:55 +04:00
bld.SAMBA_SUBSYSTEM('KPASSWD_GLUE',
source='kpasswd_glue.c',
deps='ldb com_err')
2016-09-08 10:55:41 +03:00
bld.SAMBA_SUBSYSTEM('MIT_KDC_IRPC',
source='mit_kdc_irpc.c',
deps='''
ldb
auth4_sam
samba-credentials
db-glue
samba-hostconfig
com_err
kdb5
''',
enabled=(bld.CONFIG_SET('SAMBA_USES_MITKDC') and bld.CONFIG_SET('HAVE_KDB_H'))
)
2010-03-17 14:07:42 +03:00
bld.SAMBA_SUBSYSTEM('MIT_SAMBA',
2014-04-25 13:55:17 +04:00
source='mit_samba.c',
deps='''
ldb
auth4_sam
2017-02-23 03:50:14 +03:00
common_auth
2014-04-25 13:55:17 +04:00
samba-credentials
db-glue
PAC_GLUE
2015-07-30 15:46:48 +03:00
KPASSWD_GLUE
2014-04-25 13:55:17 +04:00
samba-hostconfig
com_err
2014-05-12 16:33:14 +04:00
sdb_kdb
kdb5
2014-04-25 13:55:17 +04:00
''',
2014-05-12 12:50:33 +04:00
enabled=(not bld.CONFIG_SET('SAMBA4_USES_HEIMDAL') and bld.CONFIG_SET('HAVE_KDB_H')) )
2014-05-12 12:49:24 +04:00
2016-04-22 23:05:54 +03:00
bld.SAMBA_BINARY('samba4ktutil',
'ktutil.c',
deps='krb5samba',
install=False)
2014-05-12 12:49:24 +04:00
bld.RECURSE('mit-kdb')