summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wscript5
-rw-r--r--wscript_configure_system_mitkrb513
2 files changed, 18 insertions, 0 deletions
diff --git a/wscript b/wscript
index a7c4f4c31b9..032f2ae5fd2 100644
--- a/wscript
+++ b/wscript
@@ -51,6 +51,11 @@ def set_options(opt):
help='build Samba with system MIT Kerberos. ' +
'You may specify list of paths where Kerberos is installed (e.g. /usr/local /usr/kerberos) to search krb5-config',
action='callback', callback=system_mitkrb5_callback, dest='with_system_mitkrb5', default=False)
+ opt.add_option('--with-system-mitkdc',
+ help=('Specify the path to the krb5kdc binary from MIT Kerberos'),
+ type="string",
+ dest='with_system_mitkdc',
+ default=None)
opt.add_option('--without-ad-dc',
help='disable AD DC functionality (enables only Samba FS (File Server, Winbind, NMBD) and client utilities.',
diff --git a/wscript_configure_system_mitkrb5 b/wscript_configure_system_mitkrb5
index 34b94520d35..9338833d242 100644
--- a/wscript_configure_system_mitkrb5
+++ b/wscript_configure_system_mitkrb5
@@ -293,3 +293,16 @@ conf.CHECK_CODE('''
'HAVE_FLAGS_IN_KRB5_CREDS',
headers='krb5.h', lib='krb5', execute=False,
msg="Checking whether krb5_creds have flags property")
+
+# Check for MIT KDC
+if conf.CONFIG_SET('AD_DC_BUILD_IS_ENABLED'):
+ Logs.info("Looking for MIT KDC")
+ conf.DEFINE('SAMBA_USES_MITKDC', 1);
+
+ kdc_path_list = [ '/usr/sbin', '/usr/lib/mit/sbin']
+
+ if getattr(Options.options, 'with_system_mitkdc', None):
+ conf.DEFINE('MIT_KDC_PATH', '"' + Options.options.with_system_mitkdc + '"')
+ else:
+ conf.find_program('krb5kdc', path_list=kdc_path_list, var='MIT_KDC_BINARY', mandatory=True)
+ conf.DEFINE('MIT_KDC_PATH', '"' + conf.env.MIT_KDC_BINARY + '"')