svn commit: samba r3343 - in trunk/source: . libsmb
jra at samba.org
jra at samba.org
Thu Oct 28 23:50:18 GMT 2004
Author: jra
Date: 2004-10-28 23:50:14 +0000 (Thu, 28 Oct 2004)
New Revision: 3343
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3343
Log:
More MIT/Heimdal fixes to allow an enctype to be explicitly set in a krb5_creds
struct.
Jeremy.
Modified:
trunk/source/configure.in
trunk/source/libsmb/clikrb5.c
Changeset:
Modified: trunk/source/configure.in
===================================================================
--- trunk/source/configure.in 2004-10-28 23:50:14 UTC (rev 3342)
+++ trunk/source/configure.in 2004-10-28 23:50:14 UTC (rev 3343)
@@ -2825,6 +2825,30 @@
[Whether the krb5_ticket struct has a enc_part2 property])
fi
+ AC_CACHE_CHECK([for keyblock in krb5_creds],
+ samba_cv_HAVE_KRB5_KEYBLOCK_IN_CREDS,[
+ AC_TRY_COMPILE([#include <krb5.h>],
+ [krb5_creds creds; krb5_keyblock kb; creds.keyblock = kb;],
+ samba_cv_HAVE_KRB5_KEYBLOCK_IN_CREDS=yes,
+ samba_cv_HAVE_KRB5_KEYBLOCK_IN_CREDS=no)])
+
+ if test x"$samba_cv_HAVE_KRB5_KEYBLOCK_IN_CREDS" = x"yes"; then
+ AC_DEFINE(HAVE_KRB5_KEYBLOCK_IN_CREDS,1,
+ [Whether the krb5_creds struct has a keyblock property])
+ fi
+
+ AC_CACHE_CHECK([for session in krb5_creds],
+ samba_cv_HAVE_KRB5_SESSION_IN_CREDS,[
+ AC_TRY_COMPILE([#include <krb5.h>],
+ [krb5_creds creds; krb5_keyblock kb; creds.session = kb;],
+ samba_cv_HAVE_KRB5_SESSION_IN_CREDS=yes,
+ samba_cv_HAVE_KRB5_SESSION_IN_CREDS=no)])
+
+ if test x"$samba_cv_HAVE_KRB5_SESSION_IN_CREDS" = x"yes"; then
+ AC_DEFINE(HAVE_KRB5_SESSION_IN_CREDS,1,
+ [Whether the krb5_creds struct has a session property])
+ fi
+
AC_CACHE_CHECK([for keyvalue in krb5_keyblock],
samba_cv_HAVE_KRB5_KEYBLOCK_KEYVALUE,[
AC_TRY_COMPILE([#include <krb5.h>],
Modified: trunk/source/libsmb/clikrb5.c
===================================================================
--- trunk/source/libsmb/clikrb5.c 2004-10-28 23:50:14 UTC (rev 3342)
+++ trunk/source/libsmb/clikrb5.c 2004-10-28 23:50:14 UTC (rev 3343)
@@ -251,6 +251,17 @@
}
#endif
+void kerberos_set_creds_enctype(krb5_creds *pcreds, int enctype)
+{
+#if defined(HAVE_KRB5_KEYBLOCK_IN_CREDS)
+ KRB5_KEY_TYPE((&pcreds->keyblock)) = enctype;
+#elif defined(HAVE_KRB5_SESSION_IN_CREDS)
+ KRB5_KEY_TYPE((&pcreds->session)) = enctype;
+#else
+#error UNKNOWN_KEYBLOCK_MEMBER_IN_KRB5_CREDS_STRUCT
+#endif
+}
+
static BOOL ads_cleanup_expired_creds(krb5_context context,
krb5_ccache ccache,
krb5_creds *credsp)
More information about the samba-cvs
mailing list