diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/wscript | 83 |
1 files changed, 80 insertions, 3 deletions
diff --git a/source3/wscript b/source3/wscript index 3339823d12..bf4536b92f 100644 --- a/source3/wscript +++ b/source3/wscript @@ -593,7 +593,8 @@ msg.msg_acctrightslen = sizeof(fd); # Check for kerberos have_gssapi=False - if Options.options.with_krb5: + if Options.options.with_krb5 and not conf.env.toplevel_build: + Logs.info("Looking for kerberos features") conf.find_program('krb5-config', var='KRB5_CONFIG') if conf.env.KRB5_CONFIG: conf.check_cfg(path="krb5-config", args="--cflags --libs", @@ -785,6 +786,82 @@ return krb5_kt_resolve(context, "WRFILE:api", &keytab); 'HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER', addmain=False, link=False, msg="Checking for KRB5_DEPRECATED define taking an identifier") + elif conf.env.toplevel_build: + # setup the right defines for a in-tree heimdal build + Logs.info("Using in-tree heimdal kerberos defines") + conf.define('HAVE_GSSAPI', 1) + conf.define('HAVE_GSSAPI_GSSAPI_H', 1) + conf.define('HAVE_AP_OPTS_USE_SUBKEY', 1) + conf.define('HAVE_KRB5_ADDRESSES', 1) + conf.define('HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK', 1) + conf.define('HAVE_KRB5_SET_REAL_TIME', 1) + conf.define('HAVE_COM_ERR_H', 1) + conf.define('HAVE_ADDR_TYPE_IN_KRB5_ADDRESS', 1) + conf.define('HAVE_GSS_DISPLAY_STATUS', 1) + conf.define('HAVE_LIBGSSAPI', 1) + conf.define('HAVE_ADDR_TYPE_IN_KRB5_ADDRESS', 1) + conf.define('HAVE_CHECKSUM_IN_KRB5_CHECKSUM', 1) + conf.define('HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE', 0) + conf.define('HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER', 0) + conf.define('HAVE_E_DATA_POINTER_IN_KRB5_ERROR', 1) + conf.define('HAVE_INITIALIZE_KRB5_ERROR_TABLE', 1) + conf.define('HAVE_KRB5_ADDRESSES', 1) + conf.define('HAVE_KRB5_AUTH_CON_SETKEY', 1) + conf.define('HAVE_KRB5_CRYPTO', 1) + conf.define('HAVE_KRB5_CRYPTO_DESTROY', 1) + conf.define('HAVE_KRB5_CRYPTO_INIT', 1) + conf.define('HAVE_KRB5_C_ENCTYPE_COMPARE', 1) + conf.define('HAVE_KRB5_C_VERIFY_CHECKSUM', 1) + conf.define('HAVE_FREE_AP_REQ', 1) + conf.define('HAVE_KRB5_DECODE_AP_REQ', 1) + conf.define('HAVE_KRB5_ENCTYPES_COMPATIBLE_KEYS', 1) + conf.define('HAVE_KRB5_ENCTYPE_TO_STRING', 1) + conf.define('HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG', 1) + conf.define('HAVE_KRB5_FREE_ERROR_CONTENTS', 1) + conf.define('HAVE_KRB5_FREE_HOST_REALM', 1) + conf.define('HAVE_KRB5_FWD_TGT_CREDS', 1) + conf.define('HAVE_KRB5_GET_CREDS', 1) + conf.define('HAVE_KRB5_GET_CREDS_OPT_ALLOC', 1) + conf.define('HAVE_KRB5_GET_CREDS_OPT_SET_IMPERSONATE', 1) + conf.define('HAVE_KRB5_GET_DEFAULT_IN_TKT_ETYPES', 1) + conf.define('HAVE_KRB5_GET_HOST_REALM', 1) + conf.define('HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC', 1) + conf.define('HAVE_KRB5_GET_INIT_CREDS_OPT_FREE', 1) + conf.define('HAVE_KRB5_GET_INIT_CREDS_OPT_GET_ERROR', 1) + conf.define('HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PAC_REQUEST', 1) + conf.define('HAVE_KRB5_GET_KDC_CRED', 1) + conf.define('HAVE_KRB5_GET_PW_SALT', 1) + conf.define('HAVE_KRB5_GET_RENEWED_CREDS', 1) + conf.define('HAVE_KRB5_KEYBLOCK_KEYVALUE', 1) + conf.define('HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK', 1) + conf.define('HAVE_KRB5_KRBHST_GET_ADDRINFO', 1) + conf.define('HAVE_KRB5_KRBHST_INIT', 1) + conf.define('HAVE_KRB5_KT_COMPARE', 1) + conf.define('HAVE_KRB5_KT_FREE_ENTRY', 1) + conf.define('HAVE_KRB5_KU_OTHER_CKSUM', 1) + conf.define('HAVE_KRB5_LOCATE_PLUGIN_H', 1) + conf.define('HAVE_KRB5_MK_REQ_EXTENDED', 1) + conf.define('HAVE_KRB5_PRINCIPAL_COMPARE_ANY_REALM', 1) + conf.define('HAVE_KRB5_PRINCIPAL_GET_COMP_STRING', 1) + conf.define('HAVE_KRB5_PRINCIPAL_GET_REALM', 1) + conf.define('HAVE_KRB5_REALM_TYPE', 1) + conf.define('HAVE_KRB5_SESSION_IN_CREDS', 1) + conf.define('HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES', 1) + conf.define('HAVE_KRB5_SET_REAL_TIME', 1) + conf.define('HAVE_KRB5_STRING_TO_KEY', 1) + conf.define('HAVE_KRB5_STRING_TO_KEY_SALT', 1) + conf.define('HAVE_KRB5_VERIFY_CHECKSUM', 1) + conf.define('HAVE_LIBKRB5', 1) + conf.define('KRB5_CREDS_OPT_FREE_REQUIRES_CONTEXT', 1) + conf.define('KRB5_VERIFY_CHECKSUM_ARGS', 6) + conf.define('HAVE_ETYPE_IN_ENCRYPTEDDATA', 1) + conf.define('KRB5_PRINC_REALM_RETURNS_REALM', 1) + conf.define('HAVE_KRB5_PRINCIPAL_GET_REALM', 1) + conf.define('HAVE_KRB5_H', 1) + conf.define('HAVE_ENCTYPE_ARCFOUR_HMAC_MD5', 1) + conf.define('HAVE_AP_OPTS_USE_SUBKEY', 1) + conf.define('HAVE_ENCTYPE_ARCFOUR_HMAC_MD5', 1) + conf.define('HAVE_ENCTYPE_ARCFOUR_HMAC', 1) else: conf.SET_TARGET_TYPE('krb5', 'EMPTY') conf.SET_TARGET_TYPE('gssapi', 'EMPTY') @@ -820,8 +897,8 @@ return krb5_kt_resolve(context, "WRFILE:api", &keytab); if not conf.CONFIG_SET('KRB5_TICKET_HAS_KEYINFO'): # We only need the following functions if we can't get the enctype # and kvno out of the ticket directly (ie. on Heimdal). - if not conf.CONFIG_SET('free_AP_REQ'): - print "no KRB5_AP_REQ_FREE_FUNCTION detected" + if not conf.CONFIG_SET('HAVE_FREE_AP_REQ'): + Logs.warn("no KRB5_AP_REQ_FREE_FUNCTION detected") use_ads=False if not conf.CONFIG_SET('HAVE_KRB5_DECODE_AP_REQ'): Logs.warn("no KRB5_AP_REQ_DECODING_FUNCTION detected") |