upgrade to c-client 4.40

--
Based on patches from: jakob@
This commit is contained in:
brad 2001-09-27 16:28:09 +00:00
parent 7e1467bcc3
commit 77000597fd
9 changed files with 158 additions and 52 deletions

View File

@ -1,16 +1,16 @@
# $OpenBSD: Makefile,v 1.15 2001/08/02 22:01:26 jakob Exp $
# $OpenBSD: Makefile,v 1.16 2001/09/27 16:28:09 brad Exp $
COMMENT= "University of Washington's c-client mail access routines"
DISTNAME= imap-2000c
PKGNAME= c-client-2000c
VERSION= 4.40
DISTNAME= pine${VERSION}
PKGNAME= c-client-${VERSION}
CATEGORIES= mail devel
NEED_VERSION= 1.427
MASTER_SITES= ftp://ftp.cac.washington.edu/imap/ \
ftp://ftp.cac.washington.edu/imap/old/ \
ftp://ftp.sunet.se/pub/unix/mail/imap/ \
ftp://ftp.sunet.se/pub/unix/mail/imap/old/
EXTRACT_SUFX= .tar.Z
NEED_VERSION= 1.460
MASTER_SITES= ftp://ftp.cac.washington.edu/pine/ \
ftp://ftp.sunet.se/pub/unix/mail/pine/ \
HOMEPAGE= http://www.washington.edu/imap/
MAINTAINER= Brad Smith <brad@openbsd.org>
@ -19,14 +19,18 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= No
PERMIT_DISTFILES_FTP= Yes
SHLIB= libc-client.so.2.1
SHLIB= libc-client.so.2.2
SUBST_VARS= SHLIB
# Disabled for now.
# EXTRAAUTHENTICATORS="gss"
MAKE_FLAGS= EXTRACFLAGS="${CFLAGS}" SHLIB="${SHLIB}" \
SPECIALAUTHENTICATORS="ssl"
SSLTYPE="unix"
ALL_TARGET= bso
WRKDIST= ${WRKDIR}/${DISTNAME}/imap
HEADERS= c-client.h env.h env_unix.h flstring.h fs.h ftl.h imap4r1.h \
linkage.c linkage.h mail.h misc.h nl.h nntp.h osdep.h \
pop3.h rfc822.h smtp.h tcp.h utf8.h
@ -42,5 +46,5 @@ do-install:
.include <bsd.port.mk>
.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:L} == "yes"
MAKE_ENV+= NO_SHARED_LIBS= Yes
MAKE_ENV+= NO_SHARED_LIBS=Yes
.endif

View File

@ -1,3 +1,3 @@
MD5 (imap-2000c.tar.Z) = 90bdc0670812234a0589286798575980
RMD160 (imap-2000c.tar.Z) = b74b352383ebb277ed7cb6138a04403172666035
SHA1 (imap-2000c.tar.Z) = 60f8f46ad77db8672037400a80f8d5f47eef2168
MD5 (pine4.40.tar.gz) = 5173fecdd0cc7c3b7da7394817ae869f
RMD160 (pine4.40.tar.gz) = 5a5a8e1c2e86b2a9dcabb5591a8795d6b47526c4
SHA1 (pine4.40.tar.gz) = 90ed30803e6b25add43bf53ec260cdf313cfb77b

View File

@ -1,6 +1,7 @@
--- Makefile.orig Tue Jan 23 18:50:36 2001
+++ Makefile Fri Feb 2 00:29:52 2001
@@ -319,7 +319,7 @@
$OpenBSD: patch-Makefile,v 1.6 2001/09/27 16:28:09 brad Exp $
--- Makefile.orig Tue Jul 3 02:25:17 2001
+++ Makefile Wed Sep 26 23:49:56 2001
@@ -256,7 +256,7 @@ BUILD=$(MAKE) build EXTRACFLAGS='$(EXTRA
# Make the IMAP Toolkit
@ -9,7 +10,7 @@
c-client:
@echo Not processed yet. In a first-time build, you must specify
@@ -431,7 +431,7 @@
@@ -367,7 +367,7 @@ an ua:
$(TOOLS)/$@ "$(LN)" src/imapd imapd
$(LN) $(TOOLS)/$@ .
@ -17,4 +18,4 @@
+build: OSTYPE rebuild rebuildclean
OSTYPE:
@echo Building c-client for $(OS)...
@echo Building c-client for $(BUILDTYPE)...

View File

@ -0,0 +1,80 @@
$OpenBSD: patch-src_c-client_auth_gss.c,v 1.1 2001/09/27 16:28:09 brad Exp $
--- src/c-client/auth_gss.c.orig Wed Sep 26 23:42:46 2001
+++ src/c-client/auth_gss.c Wed Sep 26 23:47:20 2001
@@ -19,8 +19,19 @@
*/
#define PROTOTYPE(x) x
+
+#ifdef HEIMDAL
+#include <gssapi.h>
+#include <krb5.h>
+#else
#include <gssapi/gssapi_generic.h>
#include <gssapi/gssapi_krb5.h>
+#endif
+
+#ifdef HEIMDAL
+#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
+#define KRB5_FCC_NOFILE KRB5_CC_NOTFOUND
+#endif
long auth_gssapi_valid (void);
long auth_gssapi_client (authchallenge_t challenger,authrespond_t responder,
@@ -28,6 +39,8 @@ long auth_gssapi_client (authchallenge_t
unsigned long *trial,char *user);
char *auth_gssapi_server (authresponse_t responder,int argc,char *argv[]);
+static long has_keytab (void);
+
AUTHENTICATOR auth_gss = {
AU_SECURE | AU_AUTHUSER, /* secure authenticator */
"GSSAPI", /* authenticator name */
@@ -45,7 +58,6 @@ AUTHENTICATOR auth_gss = {
#define SERVER_LOG(x,y) syslog (LOG_ALERT,x,y)
-extern char *krb5_defkeyname; /* sneaky way to get this name */
/* Check if GSSAPI valid on this system
* Returns: T if valid, NIL otherwise
@@ -63,10 +75,38 @@ long auth_gssapi_valid (void)
/* see if can build a name */
if (gss_import_name (&smn,&buf,gss_nt_service_name,&name) != GSS_S_COMPLETE)
return NIL; /* failed */
- if ((s = strchr (krb5_defkeyname,':')) && stat (++s,&sbuf))
+ if (!has_keytab ())
auth_gss.server = NIL; /* can't do server if no keytab */
gss_release_name (&smn,&name);/* finished with name */
return LONGT;
+}
+
+/* Check if there is a keytab.
+ * Returns: T if it exists, NIL otherwise
+ */
+
+static long has_keytab (void)
+{
+ krb5_context context;
+ krb5_error_code ret;
+ krb5_keytab kt;
+ krb5_kt_cursor cursor;
+
+ ret = krb5_init_context (&context);
+ if (ret)
+ return NIL;
+ ret = krb5_kt_default (context, &kt);
+ if (ret) {
+ krb5_free_context (context);
+ return NIL;
+ }
+ ret = krb5_kt_start_seq_get (context, kt, &cursor);
+ krb5_kt_close (context, kt);
+ krb5_free_context (context);
+ if (ret)
+ return NIL;
+ else
+ return T;
}
/* Client authenticator

View File

@ -1,14 +1,26 @@
--- src/osdep/unix/Makefile.orig Thu Feb 1 13:15:58 2001
+++ src/osdep/unix/Makefile Fri Feb 2 09:06:26 2001
@@ -84,6 +84,7 @@
DEFAULTAUTHENTICATORS=md5 $(SPECIALAUTHENTICATORS) log
$OpenBSD: patch-src_osdep_unix_Makefile,v 1.8 2001/09/27 16:28:09 brad Exp $
--- src/osdep/unix/Makefile.orig Wed Aug 29 15:15:15 2001
+++ src/osdep/unix/Makefile Wed Sep 26 23:32:25 2001
@@ -28,8 +28,8 @@ SSLTYPE=none
# Extended flags needed for SSL. You may need to modify.
-SSLDIR=/usr/local/ssl
-SSLCERTS=$(SSLDIR)/certs
+SSLDIR=/usr
+SSLCERTS=/etc/ssl
SSLINCLUDE=$(SSLDIR)/include
SSLLIB=$(SSLDIR)/lib
@@ -107,6 +107,7 @@ RANLIB=ranlib
DEFAULTAUTHENTICATORS=md5 pla log
DEFAULTDRIVERS=imap nntp pop3 mh mx mbx tenex mtx mmdf unix news phile
+.SUFFIXES: .o .so
# Normally no need to change any of these
@@ -92,6 +93,7 @@
@@ -115,6 +116,7 @@ BINARIES=mail.o misc.o newsrc.o smanager
dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
unix.o mbox.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o
@ -16,7 +28,7 @@
CFLAGS=-g
CAT=cat
@@ -100,6 +102,7 @@
@@ -123,6 +125,7 @@ MV=mv
RM=rm -rf
SH=sh
@ -24,7 +36,7 @@
# Primary build command
@@ -210,7 +213,7 @@
@@ -234,7 +237,7 @@ bso: # OpenBSD
SPOOLDIR=/var \
ACTIVEFILE=/usr/local/news/lib/active \
RSHPATH=/usr/bin/rsh \
@ -33,7 +45,7 @@
cvx: # Convex
$(BUILD) `$(CAT) SPECIALS` OS=$@ \
@@ -718,23 +721,32 @@
@@ -762,23 +765,33 @@ vu2: # VAX Ultrix 2.3, etc.
# Build it!
@ -59,16 +71,17 @@
+.c.so:
+ `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $(PICFLAG) -DPIC $(@:.so=.c) -o $@
+
# Cleanup
clean:
- sh -c '$(RM) auths.c crexcl.c flockbsd.c linkage.[ch] siglocal.c osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE $(ARCHIVE) || true'
+ sh -c '$(RM) auths.c crexcl.c flockbsd.c linkage.[ch] siglocal.c osdep*.[ch] *.o *.so ARCHIVE *FLAGS *TYPE $(ARCHIVE) $(SHLIB) || true'
- sh -c '$(RM) auths.c crexcl.c nfstest.c linkage.[ch] siglocal.c osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE $(ARCHIVE) || true'
+ sh -c '$(RM) auths.c crexcl.c nfstest.c linkage.[ch] siglocal.c osdep*.[ch] *.o *.so ARCHIVE *FLAGS *TYPE $(ARCHIVE) $(SHLIB) || true'
# Dependencies
@@ -768,7 +780,7 @@
@@ -812,7 +825,7 @@ utf8.o: mail.h misc.h osdep.h utf8.h
# OS-dependent
@ -76,9 +89,9 @@
+OSDEPS= mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
osdep.h env_unix.h tcp_unix.h \
osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c \
auths.c crexcl.c flock.c flockbsd.c flcksafe.c fsync.c gethstid.c \
@@ -780,7 +792,12 @@
write.c \
auths.c crexcl.c flocksim.c nfstest.c flcksafe.c fsync.c gethstid.c \
@@ -824,7 +837,12 @@ osdep.o:mail.h misc.h env.h fs.h ftl.h n
write.c sslstdio.c \
strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
OSCFLAGS
- `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
@ -89,5 +102,5 @@
+osdep.so: $(OSDEPS)
+ `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` $(PICFLAG) -DPIC osdep.c -o $@
osdep.c: osdepbas.c osdepckp.c osdeplog.c
$(CAT) osdepbas.c osdepckp.c osdeplog.c > osdep.c
osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c
$(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-src_osdep_unix_Makefile.gss,v 1.1 2001/09/27 16:28:09 brad Exp $
--- src/osdep/unix/Makefile.gss.orig Tue Feb 6 17:28:53 2001
+++ src/osdep/unix/Makefile.gss Wed Sep 26 23:49:57 2001
@@ -21,11 +21,10 @@
# Extended flags needed for additional authenticators. You may need to modify.
GSSDIR=/usr/local
-GSSCFLAGS= -I$(GSSDIR)/include
-GSSOLDLDFLAGS= -L$(GSSDIR)/lib -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err
-GSSNEWLDFLAGS= -L$(GSSDIR)/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
+GSSCFLAGS= -I/usr/include/kerberosV -DHEIMDAL
+GSSLDFLAGS=
gss: # GSSAPI Kerberos V flags
echo $(GSSCFLAGS) >> OSCFLAGS
- sh -c '(test -f $(GSSDIR)/lib/libk5crypto.a) && echo $(GSSNEWLDFLAGS) || echo $(GSSOLDLDFLAGS)' >> LDFLAGS
+ echo $(GSSLDFLAGS) >> LDFLAGS

View File

@ -1,13 +0,0 @@
--- src/osdep/unix/Makefile.ssl.orig Fri Dec 8 09:28:02 2000
+++ src/osdep/unix/Makefile.ssl Fri Dec 8 09:27:14 2000
@@ -20,8 +20,8 @@
# Extended flags needed for additional authenticators. You may need to modify.
-SSLDIR=/usr/local/ssl
-SSLCERTS=$(SSLDIR)/certs
+SSLDIR=/usr
+SSLCERTS=/etc/ssl
SSLINCLUDE=$(SSLDIR)/include
SSLLIB=$(SSLDIR)/lib

View File

@ -1,6 +1,7 @@
--- src/osdep/unix/env_unix.c.orig Thu Dec 21 01:12:13 2000
+++ src/osdep/unix/env_unix.c Thu Jan 18 16:11:09 2001
@@ -971,7 +971,8 @@ long dotlock_lock (char *file,DOTLOCK *b
$OpenBSD: patch-src_osdep_unix_env_unix.c,v 1.3 2001/09/27 16:28:09 brad Exp $
--- src/osdep/unix/env_unix.c.orig Mon Jun 25 23:10:04 2001
+++ src/osdep/unix/env_unix.c Wed Sep 26 23:49:57 2001
@@ -992,7 +992,8 @@ long dotlock_lock (char *file,DOTLOCK *b
}
close (pi[0]); close (pi[1]);
}

View File

@ -1,3 +1,5 @@
c-client is a common API for accessing mailboxes. It is used internally by
the popular PINE mail reader as well as the University of Washington's
IMAP server.
WWW: ${HOMEPAGE}