pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/imap-uw Add IMAP_UW_USE_WHOSON



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d386b0efb91d
branches:  trunk
changeset: 481737:d386b0efb91d
user:      abs <abs%pkgsrc.org@localhost>
date:      Mon Oct 11 16:56:28 2004 +0000

description:
Add IMAP_UW_USE_WHOSON
No change to default build, so no version bump

diffstat:

 mail/imap-uw/Makefile         |  15 ++++++++++++---
 mail/imap-uw/distinfo         |   4 ++--
 mail/imap-uw/patches/patch-am |  40 +++++++++++++++++++++++++++++-----------
 3 files changed, 43 insertions(+), 16 deletions(-)

diffs (103 lines):

diff -r adbe6d8420a9 -r d386b0efb91d mail/imap-uw/Makefile
--- a/mail/imap-uw/Makefile     Mon Oct 11 16:53:26 2004 +0000
+++ b/mail/imap-uw/Makefile     Mon Oct 11 16:56:28 2004 +0000
@@ -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 @@
 .  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+=     CREATEPROTO=${IMAP_UW_CCLIENT_MBOX_FMT:Q}proto
 
 ALL_TARGET+=   CC="${LIBTOOL} ${CC}"
+.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}"
-ALL_TARGET+=   EXTRALDFLAGS="${LDFLAGS}"
+.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 @@
 .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 -r adbe6d8420a9 -r d386b0efb91d mail/imap-uw/distinfo
--- a/mail/imap-uw/distinfo     Mon Oct 11 16:53:26 2004 +0000
+++ b/mail/imap-uw/distinfo     Mon Oct 11 16:56:28 2004 +0000
@@ -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-aj) = 0a728d3b5271c048275a4d41002877e86ac275b2
 SHA1 (patch-ak) = a0a1a21ec22a92d086e665b263b51532207d0e3c
 SHA1 (patch-al) = b746d36cb324114468d07d1aba7d22c5bd5b23b2
-SHA1 (patch-am) = b75052f548fad7563c6bf22ad1be4d736d204bef
+SHA1 (patch-am) = 891de03bbc24de9eaf70d74c69b5b66d0b6b94b4
diff -r adbe6d8420a9 -r d386b0efb91d mail/imap-uw/patches/patch-am
--- a/mail/imap-uw/patches/patch-am     Mon Oct 11 16:53:26 2004 +0000
+++ b/mail/imap-uw/patches/patch-am     Mon Oct 11 16:56:28 2004 +0000
@@ -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 <grp.h>
+ #include <signal.h>
+ #include <sys/wait.h>
++#ifdef USE_WHOSON
++#include <whoson.h>
++#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 */



Home | Main Index | Thread Index | Old Index