pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail Add heimdal support patches from imap-uw package.
details: https://anonhg.NetBSD.org/pkgsrc/rev/d8a1f68616d3
branches: trunk
changeset: 609832:d8a1f68616d3
user: markd <markd%pkgsrc.org@localhost>
date: Wed Oct 10 19:45:49 2012 +0000
description:
Add heimdal support patches from imap-uw package.
diffstat:
mail/alpine/Makefile | 4 +-
mail/alpine/distinfo | 5 +-
mail/alpine/options.mk | 21 ++-
mail/alpine/patches/patch-imap_src_c-client_auth_gss.c | 60 +++++++++++
mail/alpine/patches/patch-imap_src_osdep_unix_Makefile.gss | 22 ++++
mail/alpine/patches/patch-imap_src_osdep_unix_kerb_mit.c | 25 ++++
mail/re-alpine/Makefile | 3 +-
mail/re-alpine/distinfo | 5 +-
mail/re-alpine/options.mk | 21 ++-
mail/re-alpine/patches/patch-imap_src_c-client_auth_gss.c | 60 +++++++++++
mail/re-alpine/patches/patch-imap_src_osdep_unix_Makefile.gss | 22 ++++
mail/re-alpine/patches/patch-imap_src_osdep_unix_kerb_mit.c | 25 ++++
12 files changed, 254 insertions(+), 19 deletions(-)
diffs (truncated from 368 to 300 lines):
diff -r 55583d2741bb -r d8a1f68616d3 mail/alpine/Makefile
--- a/mail/alpine/Makefile Wed Oct 10 19:39:57 2012 +0000
+++ b/mail/alpine/Makefile Wed Oct 10 19:45:49 2012 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.29 2012/10/08 12:19:02 asau Exp $
+# $NetBSD: Makefile,v 1.30 2012/10/10 19:45:49 markd Exp $
#
DISTNAME= alpine-2.00
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= mail
MASTER_SITES= ftp://ftp.cac.washington.edu/alpine/
DIST_SUBDIR= alpine-2.00a
diff -r 55583d2741bb -r d8a1f68616d3 mail/alpine/distinfo
--- a/mail/alpine/distinfo Wed Oct 10 19:39:57 2012 +0000
+++ b/mail/alpine/distinfo Wed Oct 10 19:45:49 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.17 2010/12/11 20:32:32 abs Exp $
+$NetBSD: distinfo,v 1.18 2012/10/10 19:45:49 markd Exp $
SHA1 (alpine-2.00a/alpine-2.00.tar.bz2) = dcbd3c5419954f484ccf706feaba31ce48cdebc4
RMD160 (alpine-2.00a/alpine-2.00.tar.bz2) = 9e67704b23b3973d8b878e65ad9e6f5026c10d13
@@ -14,3 +14,6 @@
Size (alpine-2.00a/searchheader.patch.gz) = 1708 bytes
SHA1 (patch-aa) = c306613a297d61591d577b6968a31fc85b03f852
SHA1 (patch-ab) = f0983d8c0123b06a2970eb2736b04afad1502450
+SHA1 (patch-imap_src_c-client_auth_gss.c) = 622b18f03074f87036f5469323125b4c855d9ce5
+SHA1 (patch-imap_src_osdep_unix_Makefile.gss) = ca09bc26a139c68afe8ac1f99be54bd1fc0e77f0
+SHA1 (patch-imap_src_osdep_unix_kerb_mit.c) = c77d5ee1e8aee30811c2df0562caa375ed270c0e
diff -r 55583d2741bb -r d8a1f68616d3 mail/alpine/options.mk
--- a/mail/alpine/options.mk Wed Oct 10 19:39:57 2012 +0000
+++ b/mail/alpine/options.mk Wed Oct 10 19:45:49 2012 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: options.mk,v 1.3 2011/05/10 01:33:12 obache Exp $
+# $NetBSD: options.mk,v 1.4 2012/10/10 19:45:49 markd Exp $
#
PKG_OPTIONS_VAR= PKG_OPTIONS.alpine
-PKG_SUPPORTED_OPTIONS= fancythreads ldap maildir pinepwd alpinesearchheader
+PKG_SUPPORTED_OPTIONS= fancythreads ldap kerberos maildir pinepwd alpinesearchheader
PKG_SUGGESTED_OPTIONS= pinepwd
.include "../../mk/bsd.options.mk"
@@ -13,11 +13,18 @@
PATCH_DIST_STRIP= -p1
.endif
-# not tested
-#.if !empty(PKG_OPTIONS:Mkerberos)
-#CONFIGURE_ARGS+= --with-krb5
-#.include "../../mk/krb5.buildlink3.mk"
-#.endif
+.if !empty(PKG_OPTIONS:Mkerberos)
+CONFIGURE_ARGS+= --with-krb5
+.include "../../mk/krb5.buildlink3.mk"
+MAKE_ENV+= KRB5_TYPE=${KRB5_TYPE}
+MAKE_FLAGS+= EXTRAAUTHENTICATORS=gss
+EXTRASPECIALS+= GSSDIR=${KRB5BASE}
+CFLAGS.heimdal= -DHEIMDAL_KRB5
+CFLAGS+= ${CFLAGS.${KRB5_TYPE}}
+MAKE_FLAGS+= EXTRALDFLAGS=${LDFLAGS:Q}
+MAKE_FLAGS+= EXTRACFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+= EXTRASPECIALS=${EXTRASPECIALS:Q}
+.endif
.if !empty(PKG_OPTIONS:Mldap)
CONFIGURE_ARGS+= --with-ldap-dir=${BUILDLINK_PREFIX.openldap-client}
diff -r 55583d2741bb -r d8a1f68616d3 mail/alpine/patches/patch-imap_src_c-client_auth_gss.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/alpine/patches/patch-imap_src_c-client_auth_gss.c Wed Oct 10 19:45:49 2012 +0000
@@ -0,0 +1,60 @@
+$NetBSD: patch-imap_src_c-client_auth_gss.c,v 1.1 2012/10/10 19:45:49 markd Exp $
+
+heimdal support from imap-uw package.
+
+--- imap/src/c-client/auth_gss.c.orig 2008-06-04 18:18:34.000000000 +0000
++++ imap/src/c-client/auth_gss.c
+@@ -26,6 +26,17 @@
+ * Last Edited: 30 August 2006
+ */
+
++#ifdef HEIMDAL_KRB5
++#include <gssapi/gssapi.h>
++#ifdef GSSAPI_GSSAPI_H_ /* older heimdals use GSSAPI_H_ */
++#include <gssapi/gssapi_krb5.h>
++#endif
++#include <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,
+@@ -64,15 +75,32 @@ long auth_gssapi_valid (void)
+ 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;
+ }
diff -r 55583d2741bb -r d8a1f68616d3 mail/alpine/patches/patch-imap_src_osdep_unix_Makefile.gss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/alpine/patches/patch-imap_src_osdep_unix_Makefile.gss Wed Oct 10 19:45:49 2012 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-imap_src_osdep_unix_Makefile.gss,v 1.1 2012/10/10 19:45:49 markd Exp $
+
+heimdal support from imap-uw package.
+
+--- imap/src/osdep/unix/Makefile.gss.orig 2007-04-05 02:20:04.000000000 +0000
++++ imap/src/osdep/unix/Makefile.gss
+@@ -29,11 +29,13 @@
+ GSSDIR=/usr/local
+ GSSINCLUDE=$(GSSDIR)/include
+ GSSLIB=$(GSSDIR)/lib
+-GSSCFLAGS= -I$(GSSINCLUDE) -DGSS_C_NT_HOSTBASED_SERVICE=gss_nt_service_name -DKRB5_DEPRECATED=1
++GSSCFLAGS= -I$(GSSINCLUDE) -I$(GSSDIR)/include/krb5
+ GSSOLDLDFLAGS= -L$(GSSLIB) -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err
+ GSSNEWLDFLAGS= -L$(GSSLIB) -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
+
+ gss: # GSSAPI Kerberos V flags
+ echo $(GSSCFLAGS) >> OSCFLAGS
+- sh -c '(test -f $(GSSLIB)/libk5crypto.a) && echo $(GSSNEWLDFLAGS) || echo $(GSSOLDLDFLAGS)' >> LDFLAGS
++ sh -c '(test -f $(GSSLIB)/libk5crypto.a) && echo $(GSSNEWLDFLAGS) || echo $(GSSOLDLDFLAGS)' >> LDFLAGS.gss1
++ sh -c '(test -z "$(KRB5_CONFIG)") || $(KRB5_CONFIG) --libs gssapi' > LDFLAGS.gss2
++ sh -c '(test -z "$(KRB5_CONFIG)") && cat LDFLAGS.gss1 || cat LDFLAGS.gss2' >> LDFLAGS
+ echo "#include \"kerb_mit.c\"" >> auths.c
diff -r 55583d2741bb -r d8a1f68616d3 mail/alpine/patches/patch-imap_src_osdep_unix_kerb_mit.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/alpine/patches/patch-imap_src_osdep_unix_kerb_mit.c Wed Oct 10 19:45:49 2012 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-imap_src_osdep_unix_kerb_mit.c,v 1.1 2012/10/10 19:45:49 markd Exp $
+
+heimdal support from imap-uw package.
+
+--- imap/src/osdep/unix/kerb_mit.c.orig 2008-06-04 18:18:34.000000000 +0000
++++ imap/src/osdep/unix/kerb_mit.c
+@@ -26,9 +26,18 @@
+ * Last Edited: 30 August 2006
+ */
+
++#ifdef HEIMDAL_KRB5
++#include <gssapi/gssapi.h>
++#ifdef GSSAPI_GSSAPI_H_ /* older heimdals use GSSAPI_H_ */
++#include <gssapi/gssapi_krb5.h>
++#endif
++#include <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 kerberos_server_valid (void);
diff -r 55583d2741bb -r d8a1f68616d3 mail/re-alpine/Makefile
--- a/mail/re-alpine/Makefile Wed Oct 10 19:39:57 2012 +0000
+++ b/mail/re-alpine/Makefile Wed Oct 10 19:45:49 2012 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.7 2012/10/08 12:19:30 asau Exp $
+# $NetBSD: Makefile,v 1.8 2012/10/10 19:49:07 markd Exp $
#
DISTNAME= re-alpine-2.02
+PKGREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=re-alpine/}
EXTRACT_SUFX= .tar.bz2
diff -r 55583d2741bb -r d8a1f68616d3 mail/re-alpine/distinfo
--- a/mail/re-alpine/distinfo Wed Oct 10 19:39:57 2012 +0000
+++ b/mail/re-alpine/distinfo Wed Oct 10 19:45:49 2012 +0000
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.2 2012/04/18 20:50:21 wiz Exp $
+$NetBSD: distinfo,v 1.3 2012/10/10 19:49:07 markd Exp $
SHA1 (re-alpine-2.02.tar.bz2) = 9c2f13dbc7ca75e7a09f81df607db84694b10fa6
RMD160 (re-alpine-2.02.tar.bz2) = ef7fc5b46315ec2d32ef4b4a60abd5ac1be16752
Size (re-alpine-2.02.tar.bz2) = 5589414 bytes
+SHA1 (patch-imap_src_c-client_auth_gss.c) = 622b18f03074f87036f5469323125b4c855d9ce5
+SHA1 (patch-imap_src_osdep_unix_Makefile.gss) = ca09bc26a139c68afe8ac1f99be54bd1fc0e77f0
+SHA1 (patch-imap_src_osdep_unix_kerb_mit.c) = c77d5ee1e8aee30811c2df0562caa375ed270c0e
SHA1 (patch-pith_smkeys.c) = 6b60a00910850e257f770c80a988230f73cc6d21
diff -r 55583d2741bb -r d8a1f68616d3 mail/re-alpine/options.mk
--- a/mail/re-alpine/options.mk Wed Oct 10 19:39:57 2012 +0000
+++ b/mail/re-alpine/options.mk Wed Oct 10 19:45:49 2012 +0000
@@ -1,17 +1,24 @@
-# $NetBSD: options.mk,v 1.1.1.1 2009/09/15 23:27:05 reed Exp $
+# $NetBSD: options.mk,v 1.2 2012/10/10 19:49:07 markd Exp $
#
PKG_OPTIONS_VAR= PKG_OPTIONS.alpine
-PKG_SUPPORTED_OPTIONS= ldap pinepwd
+PKG_SUPPORTED_OPTIONS= ldap kerberos pinepwd
PKG_SUGGESTED_OPTIONS= pinepwd
.include "../../mk/bsd.options.mk"
-# not tested
-#.if !empty(PKG_OPTIONS:Mkerberos)
-#CONFIGURE_ARGS+= --with-krb5
-#.include "../../mk/krb5.buildlink3.mk"
-#.endif
+.if !empty(PKG_OPTIONS:Mkerberos)
+CONFIGURE_ARGS+= --with-krb5
+.include "../../mk/krb5.buildlink3.mk"
+MAKE_ENV+= KRB5_TYPE=${KRB5_TYPE}
+MAKE_FLAGS+= EXTRAAUTHENTICATORS=gss
+EXTRASPECIALS+= GSSDIR=${KRB5BASE}
+CFLAGS.heimdal= -DHEIMDAL_KRB5
+CFLAGS+= ${CFLAGS.${KRB5_TYPE}}
+MAKE_FLAGS+= EXTRALDFLAGS=${LDFLAGS:Q}
+MAKE_FLAGS+= EXTRACFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+= EXTRASPECIALS=${EXTRASPECIALS:Q}
+.endif
.if !empty(PKG_OPTIONS:Mldap)
CONFIGURE_ARGS+= --with-ldap
diff -r 55583d2741bb -r d8a1f68616d3 mail/re-alpine/patches/patch-imap_src_c-client_auth_gss.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/re-alpine/patches/patch-imap_src_c-client_auth_gss.c Wed Oct 10 19:45:49 2012 +0000
@@ -0,0 +1,60 @@
+$NetBSD: patch-imap_src_c-client_auth_gss.c,v 1.1 2012/10/10 19:49:07 markd Exp $
+
+heimdal support from imap-uw package.
+
+--- imap/src/c-client/auth_gss.c.orig 2008-06-04 18:18:34.000000000 +0000
++++ imap/src/c-client/auth_gss.c
+@@ -26,6 +26,17 @@
+ * Last Edited: 30 August 2006
+ */
+
++#ifdef HEIMDAL_KRB5
++#include <gssapi/gssapi.h>
++#ifdef GSSAPI_GSSAPI_H_ /* older heimdals use GSSAPI_H_ */
++#include <gssapi/gssapi_krb5.h>
++#endif
++#include <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,
+@@ -64,15 +75,32 @@ long auth_gssapi_valid (void)
+ 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;
Home |
Main Index |
Thread Index |
Old Index