diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | configure.in | 19 | ||||
-rw-r--r-- | env.c | 5 | ||||
-rw-r--r-- | fetchmail.c | 2 | ||||
-rw-r--r-- | fetchmail.h | 12 | ||||
-rw-r--r-- | fetchmail.man | 3 | ||||
-rw-r--r-- | idle.c | 1 | ||||
-rw-r--r-- | odmr.c | 1 | ||||
-rw-r--r-- | sink.c | 7 | ||||
-rw-r--r-- | smtp.h | 2 | ||||
-rw-r--r-- | socket.c | 12 |
11 files changed, 38 insertions, 28 deletions
@@ -8,6 +8,8 @@ * Include James Stone's moldremover.py script. * Enable .fetchmailrc permissions checking under Cygwin. * Nalin Dahyabai's fix for POP3 strong authentication. +* HOME_ETC patch for PLD Linux. +* Sunil Shetye's fix for SSL configuration. fetchmail-6.2.5 (Wed Oct 15 18:39:22 EDT 2003), 23079 lines: diff --git a/configure.in b/configure.in index a13bdf6c..f7137f91 100644 --- a/configure.in +++ b/configure.in @@ -25,12 +25,14 @@ AC_AIX AC_ISC_POSIX AC_MINIX AC_HEADER_STDC +AC_HEADER_TIME AC_TYPE_SIZE_T AC_TYPE_PID_T AC_TYPE_SIGNAL AC_CHECK_HEADERS(unistd.h termios.h termio.h sgtty.h stdarg.h alloca.h) AC_CHECK_HEADERS(sys/itimer.h fcntl.h sys/fcntl.h memory.h sys/wait.h sys/shm.h) AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h resolv.h net/socket.h sys/select.h) +AC_CHECK_HEADERS(sys/time.h) AC_C_CONST dnl getopt needs this. @@ -572,15 +574,18 @@ then # This will screw up if an OpenSSL install is located in a later # directory than an older SSLeay install, but the user should fix that # anyways and he can override on the configure line. + # Just testing for directories is not sufficient, /usr exists on + # all systems! for ac_dir in \ /usr/local/ssl \ + /usr/local \ /usr/ssl \ /usr \ /local/ssl \ /opt/ssl \ ; \ do - if test -d "$ac_dir" ; then + if test -r "$ac_dir/include/openssl/ssl.h" ; then with_ssl=$ac_dir break; fi @@ -600,18 +605,14 @@ then if test -r $with_ssl/include/openssl/ssl.h then ### ssl.h found under openssl. Use openssl configuration preferentially, + echo "Enabling OpenSSL support in $with_ssl" + test "$with_ssl" != "/usr" && CEFLAGS="$CEFLAGS -I$with_ssl/include" ### In Red Hat 9, this file includes a reference to <krb5.h>, so we ### force the Kerberos direcory onto the include path so it will build. - echo "Enabling OpenSSL support in $with_ssl" - CEFLAGS="$CEFLAGS -I$with_ssl/include -I/usr/kerberos/include" + CEFLAGS="$CEFLAGS -I/usr/kerberos/include" ### OpenBSD comes with ssl headers - elif test -r /usr/include/ssl/ssl.h - then - echo "Enabling SSLeay support in $with_ssl" - CEFLAGS="$CEFLAGS -I/usr/include/ssl" else - echo "Enabling SSLeay support in $with_ssl" - test "$with_ssl" != "/usr" && CEFLAGS="$CEFLAGS -I$with_ssl/include" + AC_ERROR([SSL support enabled, but OpenSSL not found]) fi LDEFLAGS="$LDEFLAGS -L$with_ssl/lib" LIBS="$LIBS -lssl -lcrypto" @@ -23,12 +23,10 @@ #include <netdb.h> #endif /* HAVE_GETHOSTBYNAME */ #include <sys/types.h> -#include <time.h> #include "fetchmail.h" #include "i18n.h" #if defined(HAVE_SETLOCALE) && defined(ENABLE_NLS) && defined(HAVE_STRFTIME) -#include <time.h> #include <locale.h> #endif @@ -107,7 +105,8 @@ void envquery(int argc, char **argv) } /* compute user's home directory */ - if (!(home = getenv("HOME"))) + home = getenv("HOME_ETC"); + if (!home && !(home = getenv("HOME"))) home = pwp->pw_dir; /* compute fetchmail's home directory */ diff --git a/fetchmail.c b/fetchmail.c index 2901bb67..fd093690 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -25,7 +25,6 @@ #include <errno.h> #include <sys/types.h> #include <sys/stat.h> -#include <sys/time.h> /* needed for Sun 4.1.2 */ #ifdef HAVE_SETRLIMIT #include <sys/resource.h> #endif /* HAVE_SETRLIMIT */ @@ -99,7 +98,6 @@ static void dropprivs(void) #endif #if defined(HAVE_SETLOCALE) && defined(ENABLE_NLS) && defined(HAVE_STRFTIME) -#include <time.h> #include <locale.h> static char *timestamp (void) { diff --git a/fetchmail.h b/fetchmail.h index 7d73032a..8f016ad3 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -8,6 +8,18 @@ /* We need this for size_t */ #include <sys/types.h> +/* We need this for time_t */ +#if TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# include <time.h> +# endif +#endif + /* constants designating the various supported protocols */ #define P_AUTO 1 #define P_POP2 2 diff --git a/fetchmail.man b/fetchmail.man index 8d29fefb..dd78270b 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -2167,6 +2167,9 @@ home directory (and lose the leading dots on their names). The \&.netrc file is looked for in the the invoking user's home directory regardless of FETCHMAILHOME's setting. +If the HOME_ETC variable is set, file $HOME_ETC/.fetchmailrc is used +instead of ~/.fetchmailrc. + .SH SIGNALS If a .I fetchmail @@ -21,7 +21,6 @@ MIT license. Compile with -DMAIN to build the demonstrator. #include <unistd.h> #include <signal.h> #include <errno.h> -#include <sys/time.h> #include <fetchmail.h> /* for ROOT_UID */ #ifndef TRUE @@ -16,7 +16,6 @@ #include <net/socket.h> #endif #include <sys/types.h> -#include <sys/time.h> #ifdef HAVE_NET_SELECT_H /* AIX needs this */ #include <net/select.h> #endif @@ -15,7 +15,6 @@ #include <errno.h> #include <string.h> #include <signal.h> -#include <time.h> #ifdef HAVE_MEMORY_H #include <memory.h> #endif /* HAVE_MEMORY_H */ @@ -31,12 +30,10 @@ #include <varargs.h> #endif #include <ctype.h> -#include <time.h> /* for W* macros after pclose() */ #define _USE_BSD #include <sys/types.h> -#include <sys/time.h> #include <sys/resource.h> #include <sys/wait.h> @@ -224,7 +221,7 @@ int smtp_open(struct query *ctl) else if (ctl->smtphost && ctl->smtphost[0] != '/') { char * cp; - if (cp = strchr (ctl->smtphost, '/')) + if ((cp = strchr (ctl->smtphost, '/'))) { /* As an alternate port for smtphost is specified, we need to strip it from domain name. */ @@ -702,7 +699,7 @@ int stuffline(struct query *ctl, char *buf) n = 0; if (ctl->mda || ctl->bsmtp) - n = fwrite(buf, 1, last - buf, sinkfp); + n = fwrite(buf, last - buf, 1, sinkfp); else if (ctl->smtp_socket != -1) n = SockWrite(ctl->smtp_socket, buf, last - buf); @@ -7,7 +7,7 @@ #ifndef _POPSMTP_ #define _POPSMTP_ -#include <time.h> +#include "config.h" #define SMTPBUFSIZE 256 @@ -200,7 +200,6 @@ static int handle_plugin(const char *host, #endif /* HAVE_SOCKETPAIR */ #ifdef __UNUSED__ -#include <sys/time.h> int SockCheckOpen(int fd) /* poll given socket; is it selectable? */ @@ -502,10 +501,11 @@ va_dcl { } #ifdef SSL_ENABLE -#include "openssl/ssl.h" -#include "openssl/err.h" -#include "openssl/pem.h" -#include "openssl/x509.h" +#include <openssl/ssl.h> +#include <openssl/err.h> +#include <openssl/pem.h> +#include <openssl/x509.h> +#include <openssl/rand.h> static SSL_CTX *_ctx = NULL; static SSL *_ssl_context[FD_SETSIZE]; @@ -759,7 +759,7 @@ int SSL_verify_callback( int ok_return, X509_STORE_CTX *ctx, int strict ) int err, depth; unsigned char digest[EVP_MAX_MD_SIZE]; char text[EVP_MAX_MD_SIZE * 3 + 1], *tp, *te; - EVP_MD *digest_tp; + const EVP_MD *digest_tp; unsigned int dsz, i, esz; X509_NAME *subj, *issuer; |