diff options
-rw-r--r-- | camel/ChangeLog | 8 | ||||
-rw-r--r-- | camel/Makefile.am | 5 | ||||
-rw-r--r-- | camel/camel-sasl-kerberos4.c | 20 | ||||
-rw-r--r-- | camel/camel-sasl-kerberos4.h | 2 |
4 files changed, 26 insertions, 9 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 0179cf917a..24f3b2805b 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,11 @@ +2001-03-01 Dan Winship <danw@ximian.com> + + * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on + krb4 now (where available), for camel-sasl-kerberos4.c + + * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if + it works yet. + 2001-03-01 Peter Williams <peterw@ximian.com> * camel-url.c (camel_url_new): Assert url_string != NULL. diff --git a/camel/Makefile.am b/camel/Makefile.am index 2d0e8a029a..adf5662dd4 100644 --- a/camel/Makefile.am +++ b/camel/Makefile.am @@ -12,6 +12,7 @@ INCLUDES = -I.. -I$(srcdir)/.. -I$(includedir) \ -I$(top_srcdir)/e-util \ $(GLIB_CFLAGS) \ $(UNICODE_CFLAGS) \ + $(KRB4_CFLAGS) \ -DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \ -DG_LOG_DOMAIN=\"camel\" @@ -142,7 +143,9 @@ libcamelinclude_HEADERS = \ libcamel_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir) -libcamel_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(UNICODE_LIBS) +libcamel_la_LIBADD = $(top_builddir)/e-util/libeutil.la \ + $(UNICODE_LIBS) \ + $(KRB4_LDFLAGS) noinst_HEADERS = \ diff --git a/camel/camel-sasl-kerberos4.c b/camel/camel-sasl-kerberos4.c index 28ef780773..bb61a440a1 100644 --- a/camel/camel-sasl-kerberos4.c +++ b/camel/camel-sasl-kerberos4.c @@ -21,17 +21,19 @@ */ #include <config.h> -#include "camel-sasl-kerberos4.h" -#include "camel-mime-utils.h" -#include <string.h> - #ifdef HAVE_KRB4 #include <krb.h> -/* MIT krb4 des.h #defines _. Sigh. We don't need it. */ +/* MIT krb4 des.h #defines _. Sigh. We don't need it. #undef it here + * so we get the gettexty _ definition later. + */ #undef _ #endif +#include "camel-sasl-kerberos4.h" +#include "camel-mime-utils.h" +#include <string.h> + #define KERBEROS_V4_PROTECTION_NONE 1 #define KERBEROS_V4_PROTECTION_INTEGRITY 2 #define KERBEROS_V4_PROTECTION_PRIVACY 4 @@ -146,12 +148,16 @@ static GByteArray * krb4_challenge (CamelSasl *sasl, const char *token, CamelException *ex) { CamelSaslKerberos4 *sasl_krb4 = CAMEL_SASL_KERBEROS4 (sasl); - struct CamelSaslKerberos4Private *priv = sasl_krb4->priv; + struct _CamelSaslKerberos4Private *priv = sasl_krb4->priv; char *buf = NULL, *data = NULL; GByteArray *ret = NULL; char *inst, *realm; struct hostent *h; int status, len; + KTEXT_ST authenticator; + CREDENTIALS credentials; + des_cblock session; + des_key_schedule schedule; if (token) data = g_strdup (token); @@ -218,7 +224,7 @@ krb4_challenge (CamelSasl *sasl, const char *token, CamelException *ex) data[5] = data[6] = data[7] = 0; strcpy (data + 8, sasl_krb4->username); - des_pcbc_encrypt ((des_cblock *)data, (des_cblock *)data, len, + des_pcbc_encrypt ((void *)data, (void *)data, len, schedule, &session, 1); memset (&session, 0, sizeof (session)); buf = base64_encode_simple (data, len); diff --git a/camel/camel-sasl-kerberos4.h b/camel/camel-sasl-kerberos4.h index 5b674ba766..806c758664 100644 --- a/camel/camel-sasl-kerberos4.h +++ b/camel/camel-sasl-kerberos4.h @@ -30,7 +30,7 @@ extern "C" { #include <camel/camel-sasl.h> #include <sys/types.h> -#include <netinet/in.h> +#include <netdb.h> #define CAMEL_SASL_KERBEROS4_TYPE (camel_sasl_kerberos4_get_type ()) #define CAMEL_SASL_KERBEROS4(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_KERBEROS4_TYPE, CamelSaslKerberos4)) |