diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2002-04-30 20:05:13 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2002-04-30 20:05:13 +0000 |
commit | 7d6dc21e6e842322797a279b633fee6631d50fcc (patch) | |
tree | edb302aec5076980668a276503a858414369bcf2 /mail/qpopper | |
parent | upgrade to 2.0 (diff) |
o Update to 4.0.4
o Add options:
- WITH_PAM and WITH_STANDALONE_MODE [1]
- WITHOUT_IPV6 [2]
- WITHOUT_U_OPTION [3]
o Remove patch merged into distribution
Submitted by: Sean Wal <sean0x77@yahoo.com> [1]
Prompted by: too many [2],
"Karsten W. Rohrbach" <karsten@rohrbach.de> [3]
Notes
Notes:
svn path=/head/; revision=58380
Diffstat (limited to 'mail/qpopper')
-rw-r--r-- | mail/qpopper/Makefile | 37 | ||||
-rw-r--r-- | mail/qpopper/distinfo | 2 | ||||
-rw-r--r-- | mail/qpopper/files/patch-popper::popper.c | 116 |
3 files changed, 33 insertions, 122 deletions
diff --git a/mail/qpopper/Makefile b/mail/qpopper/Makefile index fd7db2d25de8..d7992137be66 100644 --- a/mail/qpopper/Makefile +++ b/mail/qpopper/Makefile @@ -6,8 +6,7 @@ # PORTNAME= qpopper -PORTVERSION= 4.0.3 -PORTREVISION= 3 +PORTVERSION= 4.0.4 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.qualcomm.com/eudora/servers/unix/popper/%SUBDIR%/ \ ftp://sunsite.doc.ic.ac.uk/Mirrors/ftp.qualcomm.com/eudora/servers/unix/popper/%SUBDIR%/ @@ -16,7 +15,7 @@ DISTNAME= ${PORTNAME}${PORTVERSION} .include <bsd.port.pre.mk> -.if ${OSVERSION} >= 400014 +.if ${OSVERSION} >= 400014 && !defined(WITHOUT_IPV6) PATCH_SITES= http://www.imasy.or.jp/~ume/ipv6/ PATCHFILES= qpopper4.0.3-ipv6-20010504.diff.gz PATCH_DIST_STRIP= -p1 @@ -70,11 +69,25 @@ pre-everything:: @${ECHO_MSG} "WITH_APOP_ONLY=yes builds with APOP authentication only" @${ECHO_MSG} "WITH_DRAC=yes builds with Dynamic Relay Authorization" @${ECHO_MSG} " Control support" - @${ECHO_MSG} "WITH_FULL_POPD_DEBUG=yes buils with more verbose debugging" + @${ECHO_MSG} "WITHOUT_IPV6=yes builds without IPv6 support" + @${ECHO_MSG} "WITH_FULL_POPD_DEBUG=yes builds with more verbose debugging" + @${ECHO_MSG} "WITH_PAM=yes builds with PAM authentication" @${ECHO_MSG} "WITH_POPPASSD=yes builds the poppassd daemon" @${ECHO_MSG} "WITHOUT_QPOPAUTH_SETUID=yes does not install qpopauth setuid to pop user" @${ECHO_MSG} "WITH_SAMPLE_POPUSERS_FILE=yes builds a default (otherwise," @${ECHO_MSG} " use an empty file) reject file" + @${ECHO_MSG} "WITH_STANDALONE_MODE=yes builds qpopper to be run without inetd" + @${ECHO_MSG} "WITHOUT_U_OPTION=yes forbids daemon command line option" + @${ECHO_MSG} " -u which allows, after a user authenticates," + @${ECHO_MSG} " process options from a file called" + @${ECHO_MSG} " .qpopper-options in the user's home directory" + @${ECHO_MSG} " This file can be owned by and writable by the" + @${ECHO_MSG} " If improperly written, may cause a buffer" + @${ECHO_MSG} " overflow which may remove such user's mail box" + + + + # If WITH_APOP_ONLY variable present in the environment, qpopper builds # with APOP authentication only. @@ -95,6 +108,11 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libdrac.a:${PORTSDIR}/mail/drac CONFIGURE_ARGS+= --enable-debugging .endif +# If WITH_PAM variable present qpopper builds with PAM authentication +.if defined(WITH_PAM) +CONFIGURE_ARGS+= --with-pam=pop3 +.endif + # If WITH_POPPASSD variable present in the environment, qpopper builds # with poppassd support. .if defined(WITH_POPPASSD) @@ -105,6 +123,12 @@ EPOPPASSD= "" EPOPPASSD= "@comment " .endif +# If WITH STANDALONE_MODE variable present qpopper is built so it runs +# without inetd +.if defined(WITH_STANDALONE_MODE) +CONFIGURE_ARGS+= --enable-standalone +.endif + .if exists(/usr/lib/libssl.a) && exists(/usr/lib/libcrypto.a) CONFIGURE_ARGS+= --with-openssl=/usr .elif exists(${LOCALBASE}/lib/libssl.a) && exists(${LOCALBASE}/lib/libcrypto.a) @@ -121,9 +145,12 @@ post-patch: @${RM} -f ${WRKSRC}/popper/md5.h @${PERL} -pi -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/man/* .if defined(WITH_POPPASSD) - @${PERL} -pi -ne "s|/usr/bin/smbpasswd|${PREFIX}/bin/smbpasswd|" \ + @${PERL} -pi -ne "s|/usr/bin/smbpasswd|${LOCALBASE}/bin/smbpasswd|" \ ${WRKSRC}/password/poppassd.c .endif +.if defined(WITHOUT_U_OPTION) + @${PERL} -pi -e 's|(getopt \(.+?)u|\1|' ${WRKSRC}/popper/main.c +.endif pre-configure: @(cd ${WRKSRC}; ${CHMOD} u+w configure*) diff --git a/mail/qpopper/distinfo b/mail/qpopper/distinfo index cf588b9ee740..f588bd3ffd2e 100644 --- a/mail/qpopper/distinfo +++ b/mail/qpopper/distinfo @@ -1,2 +1,2 @@ -MD5 (qpopper4.0.3.tar.gz) = 7dbe34c677e26617b1c02ca8abe1982c +MD5 (qpopper4.0.4.tar.gz) = 77f0968cd10b0d5236114838d9f507e5 MD5 (qpopper4.0.3-ipv6-20010504.diff.gz) = a4d5a3d0990517a2e23eb6f026006d19 diff --git a/mail/qpopper/files/patch-popper::popper.c b/mail/qpopper/files/patch-popper::popper.c deleted file mode 100644 index 17ad00dcd524..000000000000 --- a/mail/qpopper/files/patch-popper::popper.c +++ /dev/null @@ -1,116 +0,0 @@ ---- popper/popper.c.orig Fri Jun 1 23:24:14 2001 -+++ popper/popper.c Sun Mar 31 05:03:49 2002 -@@ -125,8 +125,8 @@ - state_table * s; - char message [ MAXLINELEN ]; - pop_result rslt = POP_FAILURE; -- char * tgetline(); -- char * getline(); -+ ssize_t tgetline(); -+ ssize_t getline(); - - /* - * seed random with the current time to nearest second -@@ -287,7 +287,7 @@ - if ( hangup ) { - pop_exit ( &p, HANGUP ); - } -- else if ( tgetline ( message, MAXLINELEN, &p, pop_timeout ) == NULL ) { -+ else if ( tgetline ( message, MAXLINELEN, &p, pop_timeout ) < 0 ) { - pop_exit ( &p, (poptimeout) ? TIMEOUT : ABORT ); - } - else if ( StackSize ( &(p.InProcess) ) ) { -@@ -400,8 +400,8 @@ - * the input is discarded. - */ - --char --*getline ( char *str, int size, POP *pPOP ) -+ssize_t -+getline ( char *str, int size, POP *pPOP ) - { - char *p = NULL; - char *pEnd = NULL; -@@ -451,7 +451,7 @@ - } - _DEBUG_LOG3 ( pPOP, "getline() returning %d: '%.*s'", - strlen(str), MIN(25, (int) strlen(str)), str ); -- return ( str ); -+ return ( strlen(str) ); - } /* got a line */ - - nRoom = pPOP->pcInBuf + nBufSz - pPOP->pcInEnd; -@@ -483,7 +483,22 @@ - else - len = read ( pPOP->input_fd, junk, sizeof(junk) ); - if ( len <= 0 ) -- break; -+ { -+ /* -+ * patch by Isao SEKI <iseki@gongon.com> and -+ * Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> -+ * return 0 is meaningless after buffer overflow -+ */ -+ -+ /* do not touch buffer before returning -+ * since it seems that qpopper -+ * believes in the contents of str -+ */ -+ -+ pop_log (pPOP, POP_NOTICE, HERE, -+ "read 0 byte. Possible buffer overflow\n"); -+ return (-1); -+ } - q = strchr ( junk, '\n' ); - if ( q == NULL ) { - disc += len; -@@ -522,7 +537,7 @@ - } /* loop and discard until we see a '\n' */ - - _DEBUG_LOG1 ( pPOP, "getline() returning %d", strlen(str) ); -- return ( str ); -+ return ( strlen(str) ); - } /* nRoom == 0 */ - - if ( pPOP->tls_started ) -@@ -544,7 +559,7 @@ - } /* main loop */ - - _DEBUG_LOG0 ( pPOP, "getline() returning NULL" ); -- return ( NULL ); -+ return ( -1 ); - } - - -@@ -552,12 +567,12 @@ - /* - * Get a line of input with a timeout. This part does the timeout - */ --char * -+ssize_t - tgetline ( char *str, int size, POP *p, int timeout ) - { - int ring(); -- -- -+ ssize_t result; -+ - (void) signal ( SIGALRM, VOIDSTAR ring ); - alarm ( timeout ); - if ( setjmp ( env ) ) { -@@ -565,12 +580,13 @@ - pop_log ( p, POP_NOTICE, HERE, "(v%s) Timeout (%d secs) during " - "nw read from %s at %s (%s)", - VERSION, timeout, p->user, p->client, p->ipaddr ); -+ result = 0; - } - else -- str = getline ( str, size, p ); -+ result = getline ( str, size, p ); - alarm ( 0 ); - signal ( SIGALRM, SIG_DFL ); -- return ( str ); -+ return ( result ); - } - - |