This patch (includes portion of the previous patch) checks for
ENCTYPE_ARCFOUR_HMAC_MD5 in libads/sasl.c (named differently to
MIT).

-- Luke

Index: configure.in
===================================================================
RCS file: /cvsroot/samba/source/configure.in,v
retrieving revision 1.409
diff -u -r1.409 configure.in
--- configure.in        22 Feb 2003 12:19:18 -0000      1.409
+++ configure.in        24 Feb 2003 10:15:52 -0000
@@ -2248,6 +2257,22 @@
 samba_cv_HAVE_KRB5_TKT_ENC_PART2=yes,samba_cv_HAVE_KRB5_TKT_ENC_PART2=no)])
 if test x"$samba_cv_HAVE_KRB5_TKT_ENC_PART2" = x"yes"; then
     AC_DEFINE(HAVE_KRB5_TKT_ENC_PART2,1,[Whether the krb5_ticket struct has a 
enc_part2 property])
+fi
+
+AC_CACHE_CHECK([for ENCTYPE_ARCFOUR_HMAC_MD5],samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5,[
+AC_TRY_COMPILE([#include <krb5.h>],
+[krb5_enctype enctype; enctype = ENCTYPE_ARCFOUR_HMAC_MD5;],
+samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5=yes,samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5=no)])
+if test x"$samba_cv_HAVE_ENCTYPE_ARCFOUR_HMAC_MD5" = x"yes"; then
+    AC_DEFINE(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5,1,[Whether the ENCTYPE_ARCFOUR_HMAC_MD5 
key type is available])
 fi
 
   ########################################################
Index: libads/ldap.c
===================================================================
RCS file: /cvsroot/samba/source/libads/ldap.c,v
retrieving revision 1.102
diff -u -r1.102 ldap.c
--- libads/ldap.c       24 Feb 2003 03:45:02 -0000      1.102
+++ libads/ldap.c       24 Feb 2003 10:15:52 -0000
@@ -1074,7 +1074,7 @@
                goto done;
 
        acct_control = UF_WORKSTATION_TRUST_ACCOUNT | UF_DONT_EXPIRE_PASSWD;
-#ifndef ENCTYPE_ARCFOUR_HMAC
+#if !defined(ENCTYPE_ARCFOUR_HMAC) && !defined(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5)
        acct_control |= UF_USE_DES_KEY_ONLY;
 #endif
        if (!(controlstr = talloc_asprintf(ctx, "%u", acct_control)))
Index: libads/sasl.c
===================================================================
RCS file: /cvsroot/samba/source/libads/sasl.c,v
retrieving revision 1.14
diff -u -r1.14 sasl.c
--- libads/sasl.c       15 Feb 2003 00:29:21 -0000      1.14
+++ libads/sasl.c       24 Feb 2003 10:15:52 -0000
@@ -244,6 +244,8 @@
        krb5_enctype enc_types[] = {
 #ifdef ENCTYPE_ARCFOUR_HMAC
                        ENCTYPE_ARCFOUR_HMAC,
+#elif defined(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5)
+                       ENCTYPE_ARCFOUR_HMAC_MD5,
 #endif
                        ENCTYPE_DES_CBC_MD5,
                        ENCTYPE_NULL};
--
Luke Howard | PADL Software Pty Ltd | www.padl.com

Reply via email to