2010-03-28 09:48:49 +11:00
#!/usr/bin/env python
2024-04-09 15:07:23 +12: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 10:20:52 +13:00
if not bld.CONFIG_SET("USING_SYSTEM_KDC"):
2022-01-19 13:15:45 +01:00
kdc_include = "../../third_party/heimdal/kdc ../../third_party/heimdal/lib/gssapi"
2014-02-21 10:20:52 +13:00
else:
kdc_include = getattr(bld.env, "CPPPATH_KDC")
2016-09-08 09:46:52 +02: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 13:02:35 +02:00
cflags_end='-Wno-strict-prototypes',
2016-09-08 09:46:52 +02:00
subsystem='service',
init_function='server_service_mitkdc_init',
deps='''
samba-hostconfig
service
talloc
UTIL_RUNCMD
2016-09-08 09:56:37 +02:00
MIT_KDC_IRPC
2016-09-08 09:58:44 +02:00
KDC-SERVER
KPASSWD-SERVICE
com_err
kadm5srv_mit
kdb5
2016-09-08 09:46:52 +02:00
''',
internal_module=False)
2010-03-17 22:07:42 +11:00
2011-11-30 07:45:25 +11:00
bld.SAMBA_LIBRARY('HDB_SAMBA4',
source='hdb-samba4.c hdb-samba4-plugin.c',
2022-03-02 10:00:17 +13: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 10:20:52 +13:00
includes=kdc_include,
2014-05-08 15:15:40 +02:00
private_library=True,
enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL')
2011-11-30 07:45:25 +11:00
)
2010-03-17 22:07:42 +11:00
2011-11-30 07:45:25 +11: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 11:43:01 +11:00
enabled = (bld.CONFIG_SET("USING_SYSTEM_KRB5") and bld.CONFIG_SET("USING_SYSTEM_HDB"))
2011-11-30 07:45:25 +11:00
)
2010-03-17 22:07:42 +11:00
2016-06-10 11:29:20 +02:00
bld.SAMBA_SUBSYSTEM('KDC-SERVER',
source='kdc-server.c kdc-proxy.c',
deps='''
krb5samba
ldb
LIBTSOCKET
LIBSAMBA_TSOCKET
2016-09-07 12:32:50 +02:00
''')
2016-06-10 11:29:20 +02:00
2016-09-07 16:03:15 +02: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 09:58:44 +02:00
elif bld.CONFIG_GET('SAMBA_USES_MITKDC'):
kpasswd_flavor_src = kpasswd_flavor_src + ' kpasswd-service-mit.c'
2016-09-07 16:03:15 +02:00
2016-09-07 12:32:14 +02:00
bld.SAMBA_SUBSYSTEM('KPASSWD-SERVICE',
2016-09-07 16:03:15 +02:00
source=kpasswd_flavor_src,
2016-09-07 12:32:14 +02:00
deps='''
krb5samba
samba_server_gensec
KPASSWD_GLUE
2022-05-18 16:52:41 +12:00
gensec_krb5_helpers
2016-09-07 12:32:14 +02:00
''')
2014-05-12 10:21:18 +02: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 22:07:42 +11:00
bld.SAMBA_SUBSYSTEM('WDC_SAMBA4',
source='wdc-samba4.c',
2014-02-21 10:20:52 +13:00
includes=kdc_include,
2023-06-16 14:49:11 +12:00
deps='ldb auth4_sam common_auth samba-credentials hdb PAC_GLUE samba-hostconfig com_err KDC-GLUE authn_policy_util',
2014-05-08 15:15:40 +02:00
enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL')
2010-03-17 22:07:42 +11:00
)
2014-05-07 16:52:42 +02:00
bld.SAMBA_SUBSYSTEM('sdb',
source='sdb.c',
2015-08-04 12:00:33 +02:00
deps='talloc krb5',
2014-05-07 16:52:42 +02:00
)
2014-05-08 17:09:08 +02:00
bld.SAMBA_SUBSYSTEM('sdb_hdb',
source='sdb_to_hdb.c',
2015-08-04 12:00:33 +02:00
deps='talloc sdb hdb',
2014-05-08 17:09:08 +02:00
autoproto='sdb_hdb.h',
enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL')
)
2010-03-17 22:07:42 +11:00
2014-05-09 13:45:19 +02: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 22:07:42 +11:00
bld.SAMBA_SUBSYSTEM('PAC_GLUE',
2023-05-09 11:57:09 +12:00
source='pac-glue.c pac-blobs.c',
2023-06-16 11:20:04 +12:00
deps='ldb auth4_sam common_auth samba-credentials samba-hostconfig com_err ad_claims authn_policy authn_policy_util'
2010-03-17 22:07:42 +11:00
)
2010-10-29 11:48:06 +11:00
bld.SAMBA_LIBRARY('pac',
2010-11-07 02:05:51 +01:00
source=[],
deps='PAC_GLUE',
private_library=True,
grouping_library=True)
2010-10-29 11:48:06 +11:00
2010-03-17 22:07:42 +11:00
2010-10-24 11:26:09 -07:00
bld.SAMBA_LIBRARY('db-glue',
2010-03-17 22:07:42 +11:00
source='db-glue.c',
2024-05-21 11:14:50 +12: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 00:43:50 +01:00
private_library=True,
2010-03-17 22:07:42 +11:00
)
2023-03-03 09:17:39 +13:00
bld.SAMBA_LIBRARY('ad_claims',
source='ad_claims.c',
2023-03-28 15:10:50 +13:00
deps='ldb samba-util samdb dsdb-module authn_policy_util',
2023-03-03 09:17:39 +13:00
private_library=True,
)
2023-05-04 10:59:49 +12:00
bld.SAMBA_LIBRARY('authn_policy_util',
source='authn_policy_util.c',
deps='authn_policy samdb dsdb-module',
private_library=True,
)
2014-08-05 17:49:55 +02:00
bld.SAMBA_SUBSYSTEM('KPASSWD_GLUE',
source='kpasswd_glue.c',
deps='ldb com_err')
2016-09-08 09:55:41 +02: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 22:07:42 +11:00
bld.SAMBA_SUBSYSTEM('MIT_SAMBA',
2014-04-25 11:55:17 +02:00
source='mit_samba.c',
deps='''
ldb
auth4_sam
2017-02-23 13:50:14 +13:00
common_auth
2014-04-25 11:55:17 +02:00
samba-credentials
db-glue
PAC_GLUE
2015-07-30 14:46:48 +02:00
KPASSWD_GLUE
2014-04-25 11:55:17 +02:00
samba-hostconfig
com_err
2014-05-12 14:33:14 +02:00
sdb_kdb
kdb5
2014-04-25 11:55:17 +02:00
''',
2014-05-12 10:50:33 +02:00
enabled=(not bld.CONFIG_SET('SAMBA4_USES_HEIMDAL') and bld.CONFIG_SET('HAVE_KDB_H')) )
2014-05-12 10:49:24 +02:00
2016-04-22 22:05:54 +02:00
bld.SAMBA_BINARY('samba4ktutil',
'ktutil.c',
deps='krb5samba',
install=False)
2014-05-12 10:49:24 +02:00
bld.RECURSE('mit-kdb')