kerberos: use KRB5_KT_KEY macro where appropriate.
[ira/wip.git] / source3 / libads / kerberos_keytab.c
index 77a50e42215906363935d8cbbc6f4a99bf4b33b3..883f5824452cb5fc4045e394110aab8180d9efdc 100644 (file)
@@ -161,15 +161,8 @@ int smb_krb5_kt_add_entry_ext(krb5_context context,
        for (i = 0; enctypes[i]; i++) {
                krb5_keyblock *keyp;
 
-#if !defined(HAVE_KRB5_KEYTAB_ENTRY_KEY) && !defined(HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK)
-#error krb5_keytab_entry has no key or keyblock member
-#endif
-#ifdef HAVE_KRB5_KEYTAB_ENTRY_KEY               /* MIT */
-               keyp = &kt_entry.key;
-#endif
-#ifdef HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK          /* Heimdal */
-               keyp = &kt_entry.keyblock;
-#endif
+               keyp = KRB5_KT_KEY(&kt_entry);
+
                if (create_kerberos_key_from_string(context, princ, &password, keyp, enctypes[i], no_salt)) {
                        continue;
                }