head 1.10; access; symbols pkgsrc-2013Q2:1.10.0.4 pkgsrc-2013Q2-base:1.10 pkgsrc-2012Q4:1.10.0.2 pkgsrc-2012Q4-base:1.10 pkgsrc-2011Q4:1.9.0.18 pkgsrc-2011Q4-base:1.9 pkgsrc-2011Q3:1.9.0.16 pkgsrc-2011Q3-base:1.9 pkgsrc-2011Q2:1.9.0.14 pkgsrc-2011Q2-base:1.9 pkgsrc-2011Q1:1.9.0.12 pkgsrc-2011Q1-base:1.9 pkgsrc-2010Q4:1.9.0.10 pkgsrc-2010Q4-base:1.9 pkgsrc-2010Q3:1.9.0.8 pkgsrc-2010Q3-base:1.9 pkgsrc-2010Q2:1.9.0.6 pkgsrc-2010Q2-base:1.9 pkgsrc-2010Q1:1.9.0.4 pkgsrc-2010Q1-base:1.9 pkgsrc-2009Q4:1.9.0.2 pkgsrc-2009Q4-base:1.9 pkgsrc-2008Q4:1.8.0.44 pkgsrc-2008Q4-base:1.8 pkgsrc-2008Q3:1.8.0.42 pkgsrc-2008Q3-base:1.8 cube-native-xorg:1.8.0.40 cube-native-xorg-base:1.8 pkgsrc-2008Q2:1.8.0.38 pkgsrc-2008Q2-base:1.8 pkgsrc-2008Q1:1.8.0.36 pkgsrc-2008Q1-base:1.8 pkgsrc-2007Q4:1.8.0.34 pkgsrc-2007Q4-base:1.8 pkgsrc-2007Q3:1.8.0.32 pkgsrc-2007Q3-base:1.8 pkgsrc-2007Q2:1.8.0.30 pkgsrc-2007Q2-base:1.8 pkgsrc-2007Q1:1.8.0.28 pkgsrc-2007Q1-base:1.8 pkgsrc-2006Q4:1.8.0.26 pkgsrc-2006Q4-base:1.8 pkgsrc-2006Q3:1.8.0.24 pkgsrc-2006Q3-base:1.8 pkgsrc-2006Q2:1.8.0.22 pkgsrc-2006Q2-base:1.8 pkgsrc-2006Q1:1.8.0.20 pkgsrc-2006Q1-base:1.8 pkgsrc-2005Q4:1.8.0.18 pkgsrc-2005Q4-base:1.8 pkgsrc-2005Q3:1.8.0.16 pkgsrc-2005Q3-base:1.8 pkgsrc-2005Q2:1.8.0.14 pkgsrc-2005Q2-base:1.8 pkgsrc-2005Q1:1.8.0.12 pkgsrc-2005Q1-base:1.8 pkgsrc-2004Q4:1.8.0.10 pkgsrc-2004Q4-base:1.8 pkgsrc-2004Q3:1.8.0.8 pkgsrc-2004Q3-base:1.8 pkgsrc-2004Q2:1.8.0.6 pkgsrc-2004Q2-base:1.8 pkgsrc-2004Q1:1.8.0.4 pkgsrc-2004Q1-base:1.8 pkgsrc-2003Q4:1.8.0.2 pkgsrc-2003Q4-base:1.8 buildlink2-base:1.8 netbsd-1-5-RELEASE:1.7 netbsd-1-4-PATCH003:1.7 netbsd-1-4-PATCH002:1.6 comdex-fall-1999:1.6 netbsd-1-4-PATCH001:1.3; locks; strict; comment @# @; 1.10 date 2012.03.22.14.13.29; author taca; state dead; branches; next 1.9; 1.9 date 2009.10.31.20.08.05; author tnn; state Exp; branches; next 1.8; 1.8 date 2000.12.11.17.23.05; author itojun; state dead; branches; next 1.7; 1.7 date 2000.04.24.11.04.18; author itojun; state Exp; branches; next 1.6; 1.6 date 99.09.15.21.30.59; author tron; state Exp; branches; next 1.5; 1.5 date 99.07.24.00.24.46; author tron; state Exp; branches; next 1.4; 1.4 date 99.07.24.00.20.38; author tron; state Exp; branches; next 1.3; 1.3 date 99.07.09.15.58.34; author itojun; state Exp; branches; next 1.2; 1.2 date 98.07.18.13.18.51; author frueauf; state dead; branches; next 1.1; 1.1 date 98.07.16.08.08.09; author tron; state Exp; branches; next ; desc @@ 1.10 log @Update qpopper to 4.1.0. 4.1 * IPv6 support * Significantly improved performance * Cygwin compatibility (for use under Windows) * Ability to execute arbitrary programs when users log in * And lots more @ text @$NetBSD: patch-ah,v 1.9 2009/10/31 20:08:05 tnn Exp $ --- popper/popper.c.orig 2006-03-09 23:32:38.000000000 +0100 +++ popper/popper.c @@@@ -150,7 +150,7 @@@@ char ** argv; char message [ MAXLINELEN ]; pop_result rslt = POP_FAILURE; char * tgetline(); - char * getline(); + char * get_line(); /* * seed random with the current time to nearest second @@@@ -425,7 +425,7 @@@@ jmp_buf env; */ char -*getline ( char *str, int size, POP *pPOP ) +*get_line ( char *str, int size, POP *pPOP ) { char *p = NULL; int nRead = 0; @@@@ -433,7 +433,7 @@@@ char int nBufSz = sizeof ( pPOP->pcInBuf ); - _DEBUG_LOG2 ( pPOP, "getline(%p,%d)", str, size ); + _DEBUG_LOG2 ( pPOP, "get_line(%p,%d)", str, size ); /* * See if there's a line in our input buffer @@@@ -472,7 +472,7 @@@@ char pPOP->pcInStart - pPOP->pcInBuf ); pPOP->pcInStart = pPOP->pcInEnd = pPOP->pcInBuf; } - _DEBUG_LOG3 ( pPOP, "getline() returning %d: '%.*s'", + _DEBUG_LOG3 ( pPOP, "get_line() returning %d: '%.*s'", strlen(str), MIN(25, (int) strlen(str)), str ); return ( str ); } /* got a line */ @@@@ -560,7 +560,7 @@@@ char } /* found a '\n' */ } /* loop and discard until we see a '\n' */ - _DEBUG_LOG2 ( pPOP, "getline() returning %d ('%c')", + _DEBUG_LOG2 ( pPOP, "get_line() returning %d ('%c')", strlen(str), *str ); return ( str ); } /* nRoom == 0 */ @@@@ -583,7 +583,7 @@@@ char break; } /* main loop */ - _DEBUG_LOG0 ( pPOP, "getline() returning NULL" ); + _DEBUG_LOG0 ( pPOP, "get_line() returning NULL" ); return ( NULL ); } @@@@ -614,7 +614,7 @@@@ tgetline ( char *str, int size, POP *p, VERSION, timeout, p->user, p->client, p->ipaddr ); } else - str = getline ( str, size, p ); + str = get_line ( str, size, p ); alarm ( 0 ); signal ( SIGALRM, SIG_DFL ); @ 1.9 log @getline -> get_line @ text @d1 1 a1 1 $NetBSD$ @ 1.8 log @upgrde to 3.1.2, as 2.x had security issues and there's no support given any longer to 2.x. NOTE: kerberos support is dropped, kerberos guru please re-do it... from ftp://ftp.qualcomm.com/eudora/servers/unix/popper/Release.Notes Release Notes: 3.1 Can now set server mode and kerberos service name using run-time options. Can now specify plain-text password handling when APOP is available using '-p 0|1|2|3' run-time option. 0 is default; 1 means clear text passwords are never permitted for any user; 2 means they are always permitted (even if an APOP entry exists), which allows them to be used as a fallback when clients don't support APOP); 3 means they are permitted on the local interface (127.*.*.*) only. Added '-D drac-host' run-time option to specify the drac host. Only valid if compiled with --enable-drac. The default is localhost. Added '-f config-file' run-time option. Additional run-time options are read from the specified file. All current run-time options can now be set this way. See INSTALL file for option names and syntax. Added '-u' run-time option to read '.qpopper-options' file in user's home directory. Added Kerberos V support. BULLDB access now uses usleep(3C) if available, resulting in many more access attempts with a shorter maximum delay. Added run-time options 'bulldb-nonfatal' (-B) and 'bulldb-max-retries' to allow fine control over BULLDB access behavior. 'bulldb-nonfatal' allows a session to continue if the bulletin database can't be locked. 'bulldb-max-retries' sets the maximum number of attempts to lock the database. This value should only be changed if you know if your system has usleep(3C) or not. On systems with usleep(3C), this can be a large value (the default is 75). On systems without usleep(3C), this should remain small (the default is 10). Added new ./configure flags (see INSTALL for more details): --enable-timing to write log records with elapsed time for authentication, initialization, and cleanup. --enable-old-uidl to generates UIDs using old (pre-3.x) style encoding. This is only useful if you also set NO_STATUS and have existing users with old (pre-3.x) spool files and you want to keep the UIDs the same. --disable-status to prevent Qpopper from writing 'Status' or 'X-UIDL' headers (sets NO_STATUS). This forces UIDs for each message to be recalculated in each session. --enable-keep-temp-drop to prevents Qpopper from deleting the temp drop files. --disable-check-pw-max to prevent Qpopper from checking for expired passwords. --disable-old-spool-loc to not check for old .user.pop files in old locations when HASH_SPOOL or HOMEDIRMAIL used. --disable-check-hash-dir to not check for or create hash spool directories. Use this if you pre-create the directories. --enable-server-mode-group-include=group to set server mode for users in the specified group. --enable-server-mode-group-exclude=group to set server mode OFF for users in the specified group. --enable-secure-nis-plus for use with secure NIS+. --disable-optimizations to turn off compiler optimizations. --with-kerberos5 for Kerberos V support (using patch from Ken Hornstein). --enable-any-kerberos-principal to accept any principal in the client request. --enable-kuserok to use kuserok() to vet users. --enable-ksockinst to use getsockinst() for Kerberos instance. --enable-standalone to create standalone POP daemon instead of being run out of inetd. Can specify IP address and/or port number to bind to as parameter 1, e.g., 'popper 199.46.50.7:8110 -S' or 'popper 8110 -S -T600'. If not specified, IP address defaults to all available. The default port is 110 except when _DEBUG (not simply DEBUG) is defined, then it is 8765. --enable-auth-file=path to permit access only to users listed in the specified file. Format is one user per line. --enable-nonauth-file=path to deny access to users listed in the specified file. Format is one user per line. --disable-update-abort to avoid the default behavior of going into update mode if the session aborts (the default behavior violates of RFC 1939, but was found to be needed when noisy dialup lines otherwise prevented users from ever deleting messages). ([RCG]) 3.0 Both dot-locking and flock() now used on all platforms. (On some systems we emulate flock() using fcntl). Added POP3 extensions(CAPA). The extensions added so far are X-MANGLE, LOGIN-DELAY and EXPIRE. X-MANGLE condenses Mime messages into a single part for ease of use by lightweight clients. The transformations supported through X-MANGLE are to and from text/plain, format=flowed, and text/html. As a way to enable MIME-mangling with clients that do not support XMANGLE, add "-no-mime" to the user name. For example, if the userid is"mary", enter it in the client as "mary-no-mime". The optional LOGIN-DELAY and EXPIRE values are only announced through the CAPA command. The values to announce are passed as command line switches. Actual enforcement of minimum login delay and message expiration is up to the site by some other means. (For example, a simple script run from crontab could be used for message expiration.) Qpopper does support automatic deletion of downloaded messages through the --enable-auto-delete configure flag. This can be used to effect EXPIRE 0 (no retention). Added new run-time options: -R to disable reverse-lookups on client IP addresses; -c to downcase user name. A failure at some point in a transaction now releases all locks explicitly. Certain paths do not release locks where SysV .lock files are created. Fixed bugs with Bulletin Services and Server mode. DEBUGn macros for debug and trace messages. Added new ./configure flags (see INSTALL for more details): --with-warnings for extra compiler warnings. --enable-shy to hide qpopper's version number in the banner and CAPA IMPLEMENTATION tag. --enable-auto-delete to automatically mark for deletion all messages downloaded with RETR. --enable-hash-spool=1|2 to use hashed spool directories. --enable-home-dir-mail=file to use a spool file in the user's home directory. --enable-bulldb=path to enable bulletins and set the path for the bulletin directory. --with-new-bulls=number to specify the maximum number of bulletins for new users (default is 10). --enable-popbulldir=path to specify an alternate location for users' popbull files. --enable-log-login to log successful user logins. This can be used, for example, to validate subsequent SMTP sessions from the same IP address within a short time period, in the absence of SMTP AUTH support by client and server. (Suggested by Andy Harper et al). --with-pam=service-name to authenticate using PAM (based on patch contributed by German Poo). --with-log-facility=name to specify the log facility. Default is LOG_LOCAL1 or LOG_MAIL, depending on the OS. --enable-uw-kludge to check for and hide a UW IMAP status message. --enable-group-bulls to show bulletins by groups (group name is second element in bulletin name). Based on patch by Mikolaj Rydzewski. --enable-timing to report timing information in the log. --enable-drac to use DRAC. Based on patches by Mike McHenry, Forrest Aldrich, Steven Champeon, and others. Added file popper/banner.h -- modify this file to add a custom banner and CAPA IMPLEMENTATION tag suffix. Note that if you modify qpopper you should indicate this using banner.h. Improved error messages and warnings: warning "Unable to get canonical name of client" now includes IP address of client; logging added for I/O errors and discarded input (line too long); added errno to POP EOF -ERR message; "Possible probe of account" warning now logged as WARNING, not CRITICAL. @ text @d1 67 a67 62 $NetBSD: patch-ah,v 1.7 2000/04/24 11:04:18 itojun Exp $ --- popper.h.orig Fri Jul 10 08:44:08 1998 +++ popper.h Mon Apr 24 19:56:38 2000 @@@@ -33,3 +33,3 @@@@ #include -# if (defined(BSD) && (BSD >= 199103)) +# if (defined(BSD) && (BSD >= 199103)) && 0 /* shouldn't be necessary anymore */ # define HAVE_UNISTD_H @@@@ -40,3 +40,15 @@@@ -#ifdef BSDI +#ifdef HAVE_STDLIB_H +# include +#endif + +#ifdef HAVE_STRING_H +# include +#endif + +#ifdef HAVE_TIME_H +# include +#endif + +#if defined (BSDI) || defined (__NetBSD__) #define BSD44_DBM @@@@ -62,3 +74,8 @@@@ #define MAXDROPLEN 64 -#define MAXLINELEN 1024 +/* + * This program always assume that fgets return whole line, + * so the buffer must be at least one char bigger than sendmail + * use, because of >From + */ +#define MAXLINELEN (2048 + 1) #define MAXMSGLINELEN MAXLINELEN @@@@ -66,11 +83,11 @@@@ #define MAXPARMCOUNT 5 -#define MAXPARMLEN 10 +#define MAXPARMLEN 32 /* Large enough for 32-byte APOP parm */ #define ALLOC_MSGS 20 -#ifndef OSF1 -# define POP_FACILITY LOG_LOCAL0 -#else +#if defined(OSF1) || defined(__NetBSD__) # define POP_FACILITY LOG_MAIL +#else +# define POP_FACILITY LOG_LOCAL0 #endif -#define POP_PRIORITY LOG_NOTICE +#define POP_PRIORITY LOG_INFO #define POP_DEBUG LOG_DEBUG @@@@ -294,3 +311,3 @@@@ #ifndef KERBEROS_SERVICE -# define KERBEROS_SERVICE "rcmd" +# define KERBEROS_SERVICE "pop" #endif @@@@ -300,3 +317,3 @@@@ #else -# ifdef BSDI +# if defined (BSDI) || defined (__NetBSD__) # include @ 1.7 log @integrate temporary fix against long-line attack, from FreeBSD ports-current (committed Apr 17 by ache@@freebsd.org). addresses problem outlined in this bugtraq article: http://www.securityfocus.com/templates/archive.pike?list=1&date=2000-04-15&msg=9763.000421@@SECURITY.NNOV.RU @ text @d1 1 a1 1 $NetBSD$ @ 1.6 log @Convert patches to unified format. @ text @d2 3 a4 6 --- popper.h.orig Fri Jul 10 01:44:08 1998 +++ popper.h Wed Sep 15 23:28:17 1999 @@@@ -31,14 +31,26 @@@@ #ifdef HAVE_SYS_PARAM_H d9 1 a9 4 # define HAVE_VPRINTF # define BIND43 # endif #endif d26 14 a39 4 #endif @@@@ -67,12 +79,12 @@@@ #define MAXPARMLEN 10 d53 1 a53 5 #define POP_LOGOPTS LOG_PID @@@@ -292,13 +304,13 @@@@ #ifdef KERBEROS d58 1 a58 3 #ifdef SOLARIS2 # include a62 2 # include # else @ 1.5 log @Don't define unnecessary IPv6 symbol on non IPv6 systems. @ text @d3 17 a19 5 --- sockunion.h.orig Sat Jul 24 02:22:28 1999 +++ sockunion.h Sat Jul 24 02:23:31 1999 @@@@ -0,0 +1,18 @@@@ +#ifndef INET_ADDRSTR +#define INET_ADDRSTRLEN 16 d22 2 a23 9 +union sockunion { + struct sockinet { + u_char si_len; + u_char si_family; + u_short si_port; + } su_si; + struct sockaddr_in su_sin; +#ifdef INET6 + struct sockaddr_in6 su_sin6; d25 42 a66 4 +}; +#define su_len su_si.si_len +#define su_family su_si.si_family +#define su_port su_si.si_port @ 1.4 log @Fix build problem on systems without IPv6 includes. @ text @d3 3 a5 3 --- sockunion.h.orig Sat Jul 24 02:11:15 1999 +++ sockunion.h Sat Jul 24 02:15:32 1999 @@@@ -0,0 +1,21 @@@@ a7 3 +#endif +#ifndef INET6_ADDRSTR +#define INET6_ADDRSTRLEN 46 @ 1.3 log @integrate USE_INET6 build better. uses the same set of NetBSD patches, and switch INET6/non-INET6 build by "#ifdef INET6". @ text @d3 10 a12 3 --- sockunion.h.orig Fri Jul 9 08:18:22 1999 +++ sockunion.h Fri Jul 9 08:20:21 1999 @@@@ -0,0 +1,14 @@@@ @ 1.2 log @Update qpopper to 2.53. @ text @d1 19 a19 18 --- pop_dropcopy.c.orig Wed Jul 1 21:54:51 1998 +++ pop_dropcopy.c Thu Jul 16 09:56:17 1998 @@@@ -975,11 +975,13 @@@@ (void)ftruncate(dfd, (OFF_T)offset); } #ifdef BULLDB + if (p->bulldir) { #ifdef GDBM - gdbm_close(p->bull_db); + gdbm_close(p->bull_db); #else - dbm_close(p->bull_db); + dbm_close(p->bull_db); #endif + } #endif (void)fseek(p->drop, 0L, SEEK_END); p->spool_end = ftell(p->drop); @ 1.1 log @Fix segmentation fault in bulletin handling as suggested by Takahiro Kambe in PR pkg/5758. @ text @@