summaryrefslogtreecommitdiff
path: root/mail/imap-uw/patches
diff options
context:
space:
mode:
authorelric <elric>2002-10-30 02:12:44 +0000
committerelric <elric>2002-10-30 02:12:44 +0000
commit2abe7ad26fed3c2586afa9fd72eda2e46bec0327 (patch)
treed36287e1e02231b6526360fd31fe59c81ac5a4b1 /mail/imap-uw/patches
parentf456bdae2904e6c0310774b3e914958fb2f292cf (diff)
downloadpkgsrc-2abe7ad26fed3c2586afa9fd72eda2e46bec0327.tar.gz
In the previous commit, I broke the non-kerberos setup. This
occurred because gss_import_name() was segfaulting if /etc/krb5.conf was not found. To fix it, I swapped the krb5_init_context() and the gss_import_name() calls, since krb5_init_context() will fail if krb5 is not configured and I can fail appropriately. I also changed slightly how the documentation is installed by the main Makefile, because the ${CP} was relying on the non-existence of the target directory.
Diffstat (limited to 'mail/imap-uw/patches')
-rw-r--r--mail/imap-uw/patches/patch-aj22
-rw-r--r--mail/imap-uw/patches/patch-al52
2 files changed, 53 insertions, 21 deletions
diff --git a/mail/imap-uw/patches/patch-aj b/mail/imap-uw/patches/patch-aj
index 11654c7fb8b..ac3eade6d21 100644
--- a/mail/imap-uw/patches/patch-aj
+++ b/mail/imap-uw/patches/patch-aj
@@ -1,25 +1,5 @@
-$NetBSD: patch-aj,v 1.7 2002/10/28 22:21:16 elric Exp $
+$NetBSD: patch-aj,v 1.8 2002/10/30 02:12:45 elric Exp $
---- src/c-client/auth_gss.c.orig Wed Oct 23 16:05:35 2002
-+++ src/c-client/auth_gss.c Wed Oct 23 16:06:44 2002
-@@ -18,9 +18,17 @@
- * 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
- #define PROTOTYPE(x) x
- #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,
--- src/osdep/unix/Makefile.gss.orig Wed Oct 23 17:23:36 2002
+++ src/osdep/unix/Makefile.gss Wed Oct 23 17:41:19 2002
@@ -20,12 +20,16 @@
diff --git a/mail/imap-uw/patches/patch-al b/mail/imap-uw/patches/patch-al
new file mode 100644
index 00000000000..d184c6effde
--- /dev/null
+++ b/mail/imap-uw/patches/patch-al
@@ -0,0 +1,52 @@
+$NetBSD: patch-al,v 1.1 2002/10/30 02:12:45 elric Exp $
+
+--- src/c-client/auth_gss.c.orig Fri Sep 28 16:35:14 2001
++++ src/c-client/auth_gss.c
+@@ -18,9 +18,17 @@
+ * 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
+ #define PROTOTYPE(x) x
+ #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,
+@@ -58,22 +66,21 @@ long auth_gssapi_valid (void)
+ krb5_context ctx;
+ krb5_keytab kt;
+ krb5_kt_cursor csr;
++ if (krb5_init_context(&ctx))
++ return NIL;
+ sprintf (tmp,"host@%s",mylocalhost ());
+ buf.length = strlen (buf.value = tmp) + 1;
+ /* see if can build a name */
+ if (gss_import_name (&smn,&buf,gss_nt_service_name,&name) != GSS_S_COMPLETE)
+ return NIL; /* failed */
+- /* make a context */
+- if (!krb5_init_context (&ctx)) {
+ /* get default keytab */
+- if (!krb5_kt_default (ctx,&kt)) {
++ 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 */
++ 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;
+ }