Check for support for in-memory keytabs, which are needed to make heimdal
authorJim McDonough <jmcd@samba.org>
Tue, 2 Sep 2003 17:02:09 +0000 (17:02 +0000)
committerJim McDonough <jmcd@samba.org>
Tue, 2 Sep 2003 17:02:09 +0000 (17:02 +0000)
work properly.  MIT does not support them, so this check will be used to
decide whether to use them.  First part of fixing bug #372.
(This used to be commit 85737fc9371d8208f3dd55d408958e357c48266e)

source3/configure.in

index 3f9510920dd2c314f56f73506d34418c308a24af..a91dbf117d6a33988f41b7b15af11da4dee171ed 100644 (file)
@@ -2573,6 +2573,28 @@ if test x"$with_ads_support" != x"no"; then
                [Whether krb5_princ_component is available])
   fi
 
+  AC_CACHE_CHECK([for memory keytab support],
+                samba_cv_HAVE_MEMORY_KEYTAB,[
+    AC_TRY_RUN([
+#include<krb5.h>
+  main()
+  {
+    krb5_context context;
+    krb5_keytab keytab;
+    
+    krb5_init_context(&context);
+    if (krb5_kt_resolve(context, "MEMORY:", &keytab))
+      exit(0);
+    exit(1);
+  }], 
+  samba_cv_HAVE_MEMORY_KEYTAB=no,
+  samba_cv_HAVE_MEMORY_KEYTAB=yes)])
+
+  if test x"$samba_cv_HAVE_MEMORY_KEYTAB" = x"yes"; then
+      AC_DEFINE(HAVE_MEMORY_KEYTAB,1,
+               [Whether in-memory keytabs are supported])
+  fi
+
 
   if test x"$ac_cv_lib_ext_krb5_krb5_mk_req_extended" = x"yes"; then
     AC_DEFINE(HAVE_KRB5,1,[Whether to have KRB5 support])