cannot build current HEAD with MIT kerberos
Stefan Metzmacher
metze at samba.org
Wed Dec 5 12:40:40 UTC 2018
Hi Swen,
>> In wscript_configure_system_mitkrb5 we have this:
>>
>> vendor = conf.cmd_and_log(conf.env.KRB5_CONFIG+['--vendor'])
>> conf.env.KRB5_VENDOR = vendor.strip().lower()
>> if conf.env.KRB5_VENDOR != 'heimdal':
>> ...
>>
>> I think if KRB5_VENDOR is heimdal, we should bail out.
>>
> Metze, you are the man :-)
>
> That was it.
>
> I removed all refernces for heimdal from my system and it works now.
>
> Thanks alot for your support !
Great!
Can you please test if the attached fix would already detect this at the
configure stage and still works if MIT is installed?
Thanks!
metze
-------------- next part --------------
From 197fb17126d500a4bda74c8b293e432551de7917 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Wed, 5 Dec 2018 13:30:07 +0100
Subject: [PATCH] wscript_configure_system_mitkrb5: reject a system heimdal
krb5-config
Review with: git show -w
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
wscript_configure_system_mitkrb5 | 38 +++++++++++++++++---------------
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/wscript_configure_system_mitkrb5 b/wscript_configure_system_mitkrb5
index 534818b9dcb0..392684cbc390 100644
--- a/wscript_configure_system_mitkrb5
+++ b/wscript_configure_system_mitkrb5
@@ -56,24 +56,26 @@ if conf.env.KRB5_CONFIG:
vendor = conf.cmd_and_log(conf.env.KRB5_CONFIG+['--vendor'])
conf.env.KRB5_VENDOR = vendor.strip().lower()
- if conf.env.KRB5_VENDOR != 'heimdal':
- conf.define('USING_SYSTEM_KRB5', 1)
- del conf.env.HEIMDAL_KRB5_CONFIG
- krb5_conf_version = conf.cmd_and_log(conf.env.KRB5_CONFIG+['--version']).strip()
-
- krb5_version = krb5_conf_version.split()[-1]
-
- # drop '-prerelease' suffix
- if krb5_version.find('-') > 0:
- krb5_version = krb5_version.split("-")[0]
-
- if parse_version(krb5_version) < parse_version(krb5_required_version):
- Logs.error('ERROR: The MIT KRB5 build with Samba AD requires at least %s. %s has been found and cannot be used' % (krb5_required_version, krb5_version))
- Logs.error('ERROR: If you want to just build Samba FS (File Server) use the option --without-ad-dc which requires version %s' % (krb5_min_required_version))
- Logs.error('ERROR: You may try to build with embedded Heimdal Kerberos by not specifying --with-system-mitkrb5')
- sys.exit(1)
- else:
- Logs.info('MIT Kerberos %s detected, MIT krb5 build can proceed' % (krb5_version))
+ if conf.env.KRB5_VENDOR == 'heimdal':
+ raise Errors.WafError('--with-system-mitkrb5 cannot be used with system heimdal')
+
+ conf.define('USING_SYSTEM_KRB5', 1)
+ del conf.env.HEIMDAL_KRB5_CONFIG
+ krb5_conf_version = conf.cmd_and_log(conf.env.KRB5_CONFIG+['--version']).strip()
+
+ krb5_version = krb5_conf_version.split()[-1]
+
+ # drop '-prerelease' suffix
+ if krb5_version.find('-') > 0:
+ krb5_version = krb5_version.split("-")[0]
+
+ if parse_version(krb5_version) < parse_version(krb5_required_version):
+ Logs.error('ERROR: The MIT KRB5 build with Samba AD requires at least %s. %s has been found and cannot be used' % (krb5_required_version, krb5_version))
+ Logs.error('ERROR: If you want to just build Samba FS (File Server) use the option --without-ad-dc which requires version %s' % (krb5_min_required_version))
+ Logs.error('ERROR: You may try to build with embedded Heimdal Kerberos by not specifying --with-system-mitkrb5')
+ sys.exit(1)
+ else:
+ Logs.info('MIT Kerberos %s detected, MIT krb5 build can proceed' % (krb5_version))
conf.CHECK_CFG(args="--cflags --libs", package="com_err", uselib_store="com_err")
conf.CHECK_FUNCS_IN('_et_list', 'com_err')
--
2.17.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20181205/aa89396f/signature.sig>
More information about the samba-technical
mailing list