[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs support for Heimdal vs MIT Kerberos (patch included)
From: |
Ulrich Mueller |
Subject: |
Re: Emacs support for Heimdal vs MIT Kerberos (patch included) |
Date: |
Wed, 6 Aug 2008 01:22:35 +0200 |
>>>>> On Tue, 05 Aug 2008, Chong Yidong wrote:
> Certainly looks safe enough. I've checked it into the branch,
> thanks. Could you also generate a patch for the Emacs 23 trunk?
Voila:
Index: configure.in
===================================================================
RCS file: /sources/emacs/emacs/configure.in,v
retrieving revision 1.553
diff -u -B -r1.553 configure.in
--- configure.in 4 Aug 2008 21:57:15 -0000 1.553
+++ configure.in 5 Aug 2008 23:10:47 -0000
@@ -2235,7 +2235,9 @@
fi
if test "${with_kerberos5}" != no; then
- AC_CHECK_HEADERS(krb5.h)
+ AC_CHECK_HEADERS(krb5.h,
+ AC_CHECK_MEMBERS([krb5_error.text, krb5_error.e_text],,,
+ [#include <krb5.h>]))
else
AC_CHECK_HEADERS(des.h,,
[AC_CHECK_HEADERS(kerberosIV/des.h,,
Index: lib-src/pop.c
===================================================================
RCS file: /sources/emacs/emacs/lib-src/pop.c,v
retrieving revision 1.51
diff -u -B -r1.51 pop.c
--- lib-src/pop.c 2 Jun 2008 06:00:51 -0000 1.51
+++ lib-src/pop.c 5 Aug 2008 23:10:59 -0000
@@ -1254,11 +1254,12 @@
krb5_free_principal (kcontext, server);
if (rem)
{
+ strcpy (pop_error, KRB_ERROR);
+ strncat (pop_error, error_message (rem),
+ ERROR_MAX - sizeof (KRB_ERROR));
+#if defined HAVE_KRB5_ERROR_TEXT
if (err_ret && err_ret->text.length)
{
- strcpy (pop_error, KRB_ERROR);
- strncat (pop_error, error_message (rem),
- ERROR_MAX - sizeof (KRB_ERROR));
strncat (pop_error, " [server says '",
ERROR_MAX - strlen (pop_error) - 1);
strncat (pop_error, err_ret->text.data,
@@ -1267,12 +1268,17 @@
strncat (pop_error, "']",
ERROR_MAX - strlen (pop_error) - 1);
}
- else
+#elif defined HAVE_KRB5_ERROR_E_TEXT
+ if (err_ret && err_ret->e_text && strlen(*err_ret->e_text))
{
- strcpy (pop_error, KRB_ERROR);
- strncat (pop_error, error_message (rem),
- ERROR_MAX - sizeof (KRB_ERROR));
+ strncat (pop_error, " [server says '",
+ ERROR_MAX - strlen (pop_error) - 1);
+ strncat (pop_error, *err_ret->e_text,
+ ERROR_MAX - strlen (pop_error) - 1);
+ strncat (pop_error, "']",
+ ERROR_MAX - strlen (pop_error) - 1);
}
+#endif
if (err_ret)
krb5_free_error (kcontext, err_ret);
krb5_auth_con_free (kcontext, auth_context);