From dd04eda1b764cd0efda2b5ddfca7fd3754577685 Mon Sep 17 00:00:00 2001 From: abs Date: Mon, 11 Oct 2004 16:56:28 +0000 Subject: Add IMAP_UW_USE_WHOSON No change to default build, so no version bump --- mail/imap-uw/Makefile | 15 ++++++++++++--- mail/imap-uw/distinfo | 4 ++-- mail/imap-uw/patches/patch-am | 40 +++++++++++++++++++++++++++++----------- 3 files changed, 43 insertions(+), 16 deletions(-) diff --git a/mail/imap-uw/Makefile b/mail/imap-uw/Makefile index 63bf057f8b9..ef134f6f6f8 100644 --- a/mail/imap-uw/Makefile +++ b/mail/imap-uw/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.83 2004/10/03 00:12:53 tv Exp $ +# $NetBSD: Makefile,v 1.84 2004/10/11 16:56:28 abs Exp $ # ATTENTION: # The Kerberos support in this software is known to be problematic. If you # upgrade this package you *must* test it on a system *without* Kerberos @@ -44,7 +44,7 @@ MAKE_ENV+= GSS_EXTRA_LDFLAGS="-ldes" . endif .endif -BUILD_DEFS+= IMAP_UW_CCLIENT_MBOX_FMT IMAP_UW_NO_CLEARTEXT +BUILD_DEFS+= IMAP_UW_CCLIENT_MBOX_FMT IMAP_UW_NO_CLEARTEXT IMAP_UW_USE_WHOSON CCLIENT_INCS= c-client.h env.h env_unix.h flocksim.h flstring.h \ fs.h ftl.h imap4r1.h linkage.c linkage.h mail.h misc.h \ netmsg.h newsrc.h nl.h nntp.h osdep.h rfc822.h \ @@ -71,8 +71,13 @@ MAKE_ENV+= CCLIENT_MINOR=${CCLIENT_MINOR:Q} MAKE_ENV+= CREATEPROTO=${IMAP_UW_CCLIENT_MBOX_FMT:Q}proto ALL_TARGET+= CC="${LIBTOOL} ${CC}" -ALL_TARGET+= EXTRACFLAGS="${CFLAGS}" +.if defined(IMAP_UW_USE_WHOSON) && ${IMAP_UW_USE_WHOSON} == "YES" +ALL_TARGET+= EXTRALDFLAGS="${LDFLAGS} -lwhoson" +ALL_TARGET+= EXTRACFLAGS="${CFLAGS} -DUSE_WHOSON" +.else ALL_TARGET+= EXTRALDFLAGS="${LDFLAGS}" +ALL_TARGET+= EXTRACFLAGS="${CFLAGS}" +.endif .if defined(IMAP_UW_NO_CLEARTEXT) && ${IMAP_UW_NO_CLEARTEXT} == "YES" ALL_TARGET+= SSLTYPE="nopwd" .elif !defined(IMAP_UW_NO_SSL) || ${IMAP_UW_NO_SSL} != "YES" @@ -169,4 +174,8 @@ do-install: .include "../../security/openssl/buildlink3.mk" .endif +.if defined(IMAP_UW_USE_WHOSON) && ${IMAP_UW_USE_WHOSON} == "YES" +.include "../../net/whoson/buildlink3.mk" +.endif + .include "../../mk/bsd.pkg.mk" diff --git a/mail/imap-uw/distinfo b/mail/imap-uw/distinfo index d21efce58b9..8d8a9133819 100644 --- a/mail/imap-uw/distinfo +++ b/mail/imap-uw/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.17 2004/08/12 12:13:54 adam Exp $ +$NetBSD: distinfo,v 1.18 2004/10/11 16:56:28 abs Exp $ SHA1 (imap-2004a.tar.Z) = e5df251f2b8c3f01e94195a2832b5ba5cd809fbb Size (imap-2004a.tar.Z) = 2224181 bytes @@ -12,4 +12,4 @@ SHA1 (patch-ai) = c495ed39fbc01e1d8b05f6acd3d11394978f9b43 SHA1 (patch-aj) = 0a728d3b5271c048275a4d41002877e86ac275b2 SHA1 (patch-ak) = a0a1a21ec22a92d086e665b263b51532207d0e3c SHA1 (patch-al) = b746d36cb324114468d07d1aba7d22c5bd5b23b2 -SHA1 (patch-am) = b75052f548fad7563c6bf22ad1be4d736d204bef +SHA1 (patch-am) = 891de03bbc24de9eaf70d74c69b5b66d0b6b94b4 diff --git a/mail/imap-uw/patches/patch-am b/mail/imap-uw/patches/patch-am index 28106221a7f..bd536d6ed28 100644 --- a/mail/imap-uw/patches/patch-am +++ b/mail/imap-uw/patches/patch-am @@ -1,13 +1,31 @@ -$NetBSD: patch-am,v 1.3 2004/08/12 12:13:54 adam Exp $ +$NetBSD: patch-am,v 1.4 2004/10/11 16:56:28 abs Exp $ ---- src/osdep/unix/env_unix.c.orig 2004-07-08 20:46:11.000000000 +0000 +--- src/osdep/unix/env_unix.c.orig 2004-08-22 19:54:29.000000000 +0100 +++ src/osdep/unix/env_unix.c -@@ -830,7 +830,7 @@ char *sysinbox () - { - char tmp[MAILTMPLEN]; - if (!sysInbox) { /* initialize if first time */ -- sprintf (tmp,"%s/%s",MAILSPOOL,myusername ()); -+ sprintf (tmp,"%s/%s",@SPOOLDIR@,@MAILBOX@); - sysInbox = cpystr (tmp); /* system inbox is from mail spool */ - } - return sysInbox; +@@ -21,6 +21,9 @@ + #include + #include + #include ++#ifdef USE_WHOSON ++#include ++#endif /* USE_WHOSON */ + + /* c-client environment parameters */ + +@@ -567,7 +570,15 @@ long server_login (char *user,char *pwd, + else if (disablePlaintext) err = "disabled"; + else if (!(authuser && *authuser)) pw = valpwd (user,pwd,argc,argv); + else if (valpwd (authuser,pwd,argc,argv)) pw = pwuser (user); +- if (pw && pw_login (pw,authuser,pw->pw_name,NIL,argc,argv)) return T; ++ if (pw && pw_login (pw,authuser,pw->pw_name,NIL,argc,argv)) { ++#ifdef USE_WHOSON ++ struct sockaddr_in sin; ++ int sinlen = sizeof (struct sockaddr_in); ++ if (getpeername(0,(struct sockaddr *) &sin,&sinlen) == 0) ++ wso_login(inet_ntoa(sin.sin_addr),user,NULL,0); ++#endif ++ return T; ++ } + syslog (level|LOG_AUTH,"Login %s user=%.64s auth=%.64s host=%.80s",err, + user,(authuser && *authuser) ? authuser : user,tcp_clienthost ()); + sleep (3); /* slow down possible cracker */ -- cgit v1.2.3