2010-03-28 01:48:49 +03:00
#!/usr/bin/env python
2014-02-21 01:20:52 +04:00
# We do this because we do not want to depend on the KDC, only find and use it's header files. We do not want
if not bld.CONFIG_SET("USING_SYSTEM_KDC"):
kdc_include = "../heimdal/kdc"
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',
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: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',
2017-02-23 03:50:14 +03:00
deps='ldb auth4_sam common_auth samba-credentials hdb db-glue samba-hostconfig com_err sdb_hdb',
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 ',
2014-02-21 01:20:52 +04:00
includes=kdc_include,
2011-11-30 00:45:25 +04:00
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',
includes=kdc_include,
deps='''
krb5samba
ldb
LIBTSOCKET
LIBSAMBA_TSOCKET
''',
enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL'))
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-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
includes=kdc_include,
deps='''
krb5samba
samba_server_gensec
KPASSWD_GLUE
''')
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,
2017-02-23 03:50:14 +03:00
deps='ldb auth4_sam common_auth samba-credentials hdb PAC_GLUE samba-hostconfig com_err KDC-GLUE',
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',
includes=kdc_include,
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',
includes=kdc_include,
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',
includes=kdc_include,
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',
source='pac-glue.c',
2014-02-21 01:20:52 +04:00
includes=kdc_include,
2017-02-23 03:50:14 +03:00
deps='ldb auth4_sam common_auth samba-credentials samba-hostconfig com_err'
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',
2017-02-23 03:50:14 +03:00
deps='ldb auth4_sam common_auth samba-credentials sdb samba-hostconfig com_err',
2011-03-19 02:43:50 +03:00
private_library=True,
2014-02-21 01:20:52 +04:00
includes=kdc_include,
2010-03-17 14:07:42 +03:00
)
2014-08-05 19:49:55 +04:00
bld.SAMBA_SUBSYSTEM('KPASSWD_GLUE',
source='kpasswd_glue.c',
includes=kdc_include,
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')