krb5_wrap: Do not use deprecated KRB5 functions
authorAndreas Schneider <asn@samba.org>
Wed, 2 Mar 2016 16:36:55 +0000 (17:36 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 7 Mar 2016 16:57:39 +0000 (17:57 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Mar  7 17:57:39 CET 2016 on sn-devel-144

lib/krb5_wrap/krb5_samba.c
wscript_configure_system_mitkrb5

index 13984e9..83bc8c9 100644 (file)
@@ -866,11 +866,23 @@ bool get_krb5_smb_session_key(TALLOC_CTX *mem_ctx,
        bool ret = false;
 
        if (remote) {
+#ifdef HAVE_KRB5_AUTH_CON_GETRECVSUBKEY
+               err = krb5_auth_con_getrecvsubkey(context,
+                                                 auth_context,
+                                                 &skey);
+#else /* HAVE_KRB5_AUTH_CON_GETRECVSUBKEY */
                err = krb5_auth_con_getremotesubkey(context,
                                                    auth_context, &skey);
+#endif /* HAVE_KRB5_AUTH_CON_GETRECVSUBKEY */
        } else {
+#ifdef HAVE_KRB5_AUTH_CON_GETSENDSUBKEY
+               err = krb5_auth_con_getsendsubkey(context,
+                                                 auth_context,
+                                                 &skey);
+#else /* HAVE_KRB5_AUTH_CON_GETSENDSUBKEY */
                err = krb5_auth_con_getlocalsubkey(context,
                                                   auth_context, &skey);
+#endif /* HAVE_KRB5_AUTH_CON_GETSENDSUBKEY */
        }
 
        if (err || skey == NULL) {
index 9c1ad8f..4353539 100644 (file)
@@ -89,6 +89,8 @@ conf.CHECK_FUNCS_IN('''
        ''', 'gssapi gssapi_krb5')
 conf.CHECK_FUNCS_IN('krb5_mk_req_extended krb5_kt_compare', 'krb5')
 conf.CHECK_FUNCS('''
+       krb5_auth_con_getrecvsubkey
+       krb5_auth_con_getsendsubkey
        krb5_set_default_in_tkt_etypes krb5_set_default_tgs_enctypes
        krb5_set_default_tgs_ktypes krb5_principal2salt
        krb5_c_string_to_key krb5_get_pw_salt krb5_string_to_key_salt krb5_auth_con_setkey