diff options
author | adam <adam> | 2003-07-30 09:29:58 +0000 |
---|---|---|
committer | adam <adam> | 2003-07-30 09:29:58 +0000 |
commit | 3521868a5ae5def833ec33eefd6cad79506ec684 (patch) | |
tree | 6ee9239bd9224603a770d81b27bfd29ff60e9fae /mail | |
parent | 421d0440d114b47254162a5034e6f56bb2bbdf64 (diff) | |
download | pkgsrc-3521868a5ae5def833ec33eefd6cad79506ec684.tar.gz |
Kerberos fix (thanks to tron)
Diffstat (limited to 'mail')
-rw-r--r-- | mail/imap-uw/Makefile | 3 | ||||
-rw-r--r-- | mail/imap-uw/distinfo | 4 | ||||
-rw-r--r-- | mail/imap-uw/patches/patch-al | 49 |
3 files changed, 50 insertions, 6 deletions
diff --git a/mail/imap-uw/Makefile b/mail/imap-uw/Makefile index 82981d93ae3..d4b804072d5 100644 --- a/mail/imap-uw/Makefile +++ b/mail/imap-uw/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.64 2003/07/30 08:05:13 tron Exp $ +# $NetBSD: Makefile,v 1.65 2003/07/30 09:29:58 adam Exp $ # ATTENTION: # The Kerberos support in this software is known to be problematic. If you @@ -7,6 +7,7 @@ DISTNAME= imap-2002d PKGNAME= imap-uw-2002.4 +PKGREVISION= 1 CATEGORIES= mail MASTER_SITES= ftp://ftp.cac.washington.edu/imap/ EXTRACT_SUFX= .tar.Z diff --git a/mail/imap-uw/distinfo b/mail/imap-uw/distinfo index 557a3a0779f..26b60e26598 100644 --- a/mail/imap-uw/distinfo +++ b/mail/imap-uw/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.12 2003/07/28 14:38:05 adam Exp $ +$NetBSD: distinfo,v 1.13 2003/07/30 09:29:58 adam Exp $ SHA1 (imap-2002d.tar.Z) = ec037715940f970c75f3f5fe892e9399b210281e Size (imap-2002d.tar.Z) = 2155224 bytes @@ -11,4 +11,4 @@ SHA1 (patch-af) = 07e6b95a8aea0ea0ee6ccc20c1906ddf16ef6d61 SHA1 (patch-ai) = aaa778f60684c797cc53a109b8430fa05ec7f424 SHA1 (patch-aj) = 0a728d3b5271c048275a4d41002877e86ac275b2 SHA1 (patch-ak) = a0a1a21ec22a92d086e665b263b51532207d0e3c -SHA1 (patch-al) = 25faa77e43754b6522e9562d7ebd388d9506bbfb +SHA1 (patch-al) = c8593cfbb5822efa05fb1343bbf1e8bb4d7c035f diff --git a/mail/imap-uw/patches/patch-al b/mail/imap-uw/patches/patch-al index 669f06f20d4..5ea5db92f78 100644 --- a/mail/imap-uw/patches/patch-al +++ b/mail/imap-uw/patches/patch-al @@ -1,14 +1,57 @@ -$NetBSD: patch-al,v 1.3 2003/07/28 14:38:06 adam Exp $ +$NetBSD: patch-al,v 1.4 2003/07/30 09:29:59 adam Exp $ --- src/c-client/auth_gss.c.orig 2003-03-05 06:24:17.000000000 +0100 -+++ src/c-client/auth_gss.c 2003-07-28 15:40:16.000000000 +0200 -@@ -18,6 +18,9 @@ ++++ src/c-client/auth_gss.c 2003-07-30 10:54:54.000000000 +0200 +@@ -18,6 +18,16 @@ * CPYRIGHT, included with this Distribution. */ +#ifdef __NetBSD__ ++/* This is really Heimdal specific, but . . . */ +#include <gssapi/gssapi.h> ++#include <krb5/krb5.h> ++ ++#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE ++#else ++#include <gssapi/gssapi_generic.h> ++#include <gssapi/gssapi_krb5.h> +#endif long auth_gssapi_valid (void); long auth_gssapi_client (authchallenge_t challenger,authrespond_t responder, +@@ -53,15 +63,32 @@ + OM_uint32 smn; + gss_buffer_desc buf; + gss_name_t name; ++ krb5_context ctx; ++ krb5_keytab kt; ++ krb5_kt_cursor csr; ++ ++ /* make a context */ ++ if (krb5_init_context (&ctx)) ++ return NIL; + /* make service name */ + sprintf (tmp,"%s@%s",(char *) mail_parameters (NIL,GET_SERVICENAME,NIL), + mylocalhost ()); + buf.length = strlen (buf.value = tmp); + /* see if can build a name */ + if (gss_import_name (&smn,&buf,GSS_C_NT_HOSTBASED_SERVICE,&name) != +- GSS_S_COMPLETE) return NIL; +- /* remove server method if no keytab */ +- if (!kerberos_server_valid ()) auth_gss.server = NIL; ++ GSS_S_COMPLETE) { ++ krb5_free_context (ctx); /* finished with context */ ++ return NIL; ++ } ++ ++ /* get default keytab */ ++ if (!krb5_kt_default (ctx,&kt)) { ++ /* can do server if have good keytab */ ++ if (!krb5_kt_start_seq_get (ctx,kt,&csr)) ++ auth_gss.server = auth_gssapi_server; ++ krb5_kt_close (ctx,kt); /* finished with keytab */ ++ } ++ krb5_free_context (ctx); /* finished with context */ + gss_release_name (&smn,&name);/* finished with name */ + return LONGT; + } |