diff options
author | Grant Goodyear <g2boojum@gentoo.org> | 2002-02-21 22:24:41 +0000 |
---|---|---|
committer | Grant Goodyear <g2boojum@gentoo.org> | 2002-02-21 22:24:41 +0000 |
commit | 5eb84362de843a5c902e4164ffae20459006fc52 (patch) | |
tree | 3f42adaa827571dc7670d1e28a553c59bb032bca /net-mail/pine/files | |
parent | updating USE settings (diff) | |
download | gentoo-2-5eb84362de843a5c902e4164ffae20459006fc52.tar.gz gentoo-2-5eb84362de843a5c902e4164ffae20459006fc52.tar.bz2 gentoo-2-5eb84362de843a5c902e4164ffae20459006fc52.zip |
Added RH patches and ldap & SSL functionality.
Diffstat (limited to 'net-mail/pine/files')
-rw-r--r-- | net-mail/pine/files/flock.c | 63 | ||||
-rw-r--r-- | net-mail/pine/files/imap-2000-time.patch | 56 | ||||
-rw-r--r-- | net-mail/pine/files/imap-4.7c2-flock.patch | 14 | ||||
-rw-r--r-- | net-mail/pine/files/pine-4.21-fixhome.patch | 26 | ||||
-rw-r--r-- | net-mail/pine/files/pine-4.21-passwd.patch | 12 | ||||
-rw-r--r-- | net-mail/pine/files/pine-4.30-ldap.patch | 11 | ||||
-rw-r--r-- | net-mail/pine/files/pine-4.31-segfix.patch | 17 | ||||
-rw-r--r-- | net-mail/pine/files/pine-4.33-whitespace.patch | 11 | ||||
-rw-r--r-- | net-mail/pine/files/pine-4.40-boguswarning.patch | 11 | ||||
-rw-r--r-- | net-mail/pine/files/pine-4.40-lockfile-perm.patch | 22 | ||||
-rw-r--r-- | net-mail/pine/files/pine-4.44-multibyte.patch | 169 |
11 files changed, 412 insertions, 0 deletions
diff --git a/net-mail/pine/files/flock.c b/net-mail/pine/files/flock.c new file mode 100644 index 000000000000..1b042be27fb4 --- /dev/null +++ b/net-mail/pine/files/flock.c @@ -0,0 +1,63 @@ +/* One of many ways to emulate flock() on top of real (good) POSIX locks. */ + +#ident "$RH: flock.c,v 1.2 2000/08/23 17:07:00 nalin Exp $" + +#include <sys/types.h> +#include <errno.h> +#include <fcntl.h> +#include <unistd.h> + +int flock(int fd, int operation) +{ + int i, cmd; + struct flock l = {0, 0, 0, 0, 0}; + if(operation & LOCK_NB) { + cmd = F_SETLK; + } else { + cmd = F_SETLKW; + } + l.l_whence = SEEK_SET; + switch(operation & (~LOCK_NB)) { + case LOCK_EX: + l.l_type = F_WRLCK; + i = fcntl(fd, cmd, &l); + if(i == -1) { + if((errno == EAGAIN) || (errno == EACCES)) { + errno = EWOULDBLOCK; + } + } + break; + case LOCK_SH: + l.l_type = F_RDLCK; + i = fcntl(fd, cmd, &l); + if(i == -1) { + if((errno == EAGAIN) || (errno == EACCES)) { + errno = EWOULDBLOCK; + } + } + break; + case LOCK_UN: + l.l_type = F_UNLCK; + i = fcntl(fd, cmd, &l); + if(i == -1) { + if((errno == EAGAIN) || (errno == EACCES)) { + errno = EWOULDBLOCK; + } + } + break; + default: + i = -1; + errno = EINVAL; + break; + } + return i; +} + +#ifdef FLOCK_EMULATE_IS_MAIN +int main(int argc, char **argv) +{ + int fd = open(argv[1], O_WRONLY); + flock(fd, LOCK_EX); + return 0; +} +#endif diff --git a/net-mail/pine/files/imap-2000-time.patch b/net-mail/pine/files/imap-2000-time.patch new file mode 100644 index 000000000000..751d1ff50611 --- /dev/null +++ b/net-mail/pine/files/imap-2000-time.patch @@ -0,0 +1,56 @@ +--- pine4.33/imap/src/osdep/unix/os_lnx.c.time Wed Feb 14 12:25:06 2001 ++++ pine4.33/imap/src/osdep/unix/os_lnx.c Wed Feb 14 12:25:16 2001 +@@ -23,6 +23,7 @@ + #include "osdep.h" + #include <stdio.h> + #include <sys/time.h> ++#include <time.h> + #include <sys/stat.h> + #include <sys/socket.h> + #include <netinet/in.h> +--- pine4.33/imap/src/osdep/unix/news.c.time Thu Jan 18 21:28:33 2001 ++++ pine4.33/imap/src/osdep/unix/news.c Wed Feb 14 12:24:34 2001 +@@ -21,7 +21,7 @@ + #include <stdio.h> + #include <ctype.h> + #include <errno.h> +-extern int errno; /* just in case */ ++#include <time.h> + #include "mail.h" + #include "osdep.h" + #include <sys/stat.h> +--- pine4.33/imap/src/osdep/unix/phile.c.time Thu Jan 18 21:31:20 2001 ++++ pine4.33/imap/src/osdep/unix/phile.c Wed Feb 14 12:24:34 2001 +@@ -21,8 +21,8 @@ + #include <stdio.h> + #include <ctype.h> + #include <errno.h> +-extern int errno; /* just in case */ + #include <signal.h> ++#include <time.h> + #include "mail.h" + #include "osdep.h" + #include <pwd.h> +--- pine4.33/imap/src/osdep/unix/mh.c.time Thu Jan 18 21:27:37 2001 ++++ pine4.33/imap/src/osdep/unix/mh.c Wed Feb 14 12:24:34 2001 +@@ -21,7 +21,8 @@ + #include <stdio.h> + #include <ctype.h> + #include <errno.h> +-extern int errno; /* just in case */ ++#include <time.h> ++ + #include "mail.h" + #include "osdep.h" + #include <pwd.h> +--- pine4.33/imap/src/osdep/unix/mx.c.time Thu Jan 18 21:28:09 2001 ++++ pine4.33/imap/src/osdep/unix/mx.c Wed Feb 14 12:24:34 2001 +@@ -21,7 +21,7 @@ + #include <stdio.h> + #include <ctype.h> + #include <errno.h> +-extern int errno; /* just in case */ ++#include <time.h> + #include "mail.h" + #include "osdep.h" + #include <pwd.h> diff --git a/net-mail/pine/files/imap-4.7c2-flock.patch b/net-mail/pine/files/imap-4.7c2-flock.patch new file mode 100644 index 000000000000..0debc7a5e02a --- /dev/null +++ b/net-mail/pine/files/imap-4.7c2-flock.patch @@ -0,0 +1,14 @@ +--- imap/src/osdep/unix/Makefile.flock Wed Aug 23 05:51:40 2000 ++++ imap/src/osdep/unix/Makefile Wed Aug 23 05:51:44 2000 +@@ -103,7 +103,7 @@ + BINARIES=mail.o misc.o newsrc.o smanager.o osdep.o utf8.o siglocal.o \ + dummy.o pseudo.o netmsg.o flstring.o fdstring.o \ + rfc822.o nntp.o smtp.o imap4r1.o pop3.o \ +- unix.o mbox.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o +-CFLAGS=-g ++ unix.o mbox.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o flock.o ++CFLAGS=$(BASECFLAGS) $(EXTRACFLAGS) + + CAT=cat + MAKE=make + MV=mv diff --git a/net-mail/pine/files/pine-4.21-fixhome.patch b/net-mail/pine/files/pine-4.21-fixhome.patch new file mode 100644 index 000000000000..7572dc9ae4cb --- /dev/null +++ b/net-mail/pine/files/pine-4.21-fixhome.patch @@ -0,0 +1,26 @@ +--- pine4.21/pico/osdep/term.cap.fixhome Tue Mar 7 16:12:39 2000 ++++ pine4.21/pico/osdep/term.cap Tue Mar 7 16:13:30 2000 +@@ -133,8 +133,8 @@ + */ + kpinsert("\033[4J", KEY_PGUP, 1); + kpinsert("\033[3J", KEY_PGDN, 1); +- kpinsert("\033[2J", KEY_HOME, 1); +- kpinsert("\033[N", KEY_END, 1); ++ kpinsert("\033[1~", KEY_HOME, 1); ++ kpinsert("\033[4~", KEY_END, 1); + + /* + * ANSI mode. +--- pine4.21/pico/osdep/term.inf.fixhome Tue Mar 7 16:13:09 2000 ++++ pine4.21/pico/osdep/term.inf Tue Mar 7 16:13:20 2000 +@@ -137,8 +137,8 @@ + */ + kpinsert("\033[4J", KEY_PGUP, 1); + kpinsert("\033[3J", KEY_PGDN, 1); +- kpinsert("\033[2J", KEY_HOME, 1); +- kpinsert("\033[N", KEY_END, 1); ++ kpinsert("\033[1~", KEY_HOME, 1); ++ kpinsert("\033[4~", KEY_END, 1); + + /* + * ANSI mode. diff --git a/net-mail/pine/files/pine-4.21-passwd.patch b/net-mail/pine/files/pine-4.21-passwd.patch new file mode 100644 index 000000000000..3919a01872a3 --- /dev/null +++ b/net-mail/pine/files/pine-4.21-passwd.patch @@ -0,0 +1,12 @@ +diff -uNr pine4.21.orig/pine/osdep/os-lnx.h pine4.21/pine/osdep/os-lnx.h +--- pine4.21.orig/pine/osdep/os-lnx.h Thu Sep 7 15:41:48 2000 ++++ pine4.21/pine/osdep/os-lnx.h Thu Sep 7 15:57:17 2000 +@@ -223,7 +223,7 @@ + + + /*--------- Program employed by users to change their password ---------*/ +-#define PASSWD_PROG "/bin/passwd" ++#define PASSWD_PROG "/usr/bin/passwd" + + + /*-------------- A couple constants used to size arrays ----------------*/ diff --git a/net-mail/pine/files/pine-4.30-ldap.patch b/net-mail/pine/files/pine-4.30-ldap.patch new file mode 100644 index 000000000000..6b920ade519d --- /dev/null +++ b/net-mail/pine/files/pine-4.30-ldap.patch @@ -0,0 +1,11 @@ +--- pine4.30/build.ldap Fri Oct 27 12:48:05 2000 ++++ pine4.30/build Fri Oct 27 12:49:00 2000 +@@ -249,7 +249,7 @@ + case "$?" in + 1) if [ "$LLIBS" != "1" ] + then +- L1="'LDAPLIBS=../ldap/libraries/libldap.a ../ldap/libraries/liblber.a'" ++ L1="'LDAPLIBS=../ldap/libraries/libldap.so ../ldap/libraries/liblber.so ../ldap/libraries/libresolv.so'" + fi + if [ "$LFLAGS" != "1" ] + then diff --git a/net-mail/pine/files/pine-4.31-segfix.patch b/net-mail/pine/files/pine-4.31-segfix.patch new file mode 100644 index 000000000000..f65aa6029432 --- /dev/null +++ b/net-mail/pine/files/pine-4.31-segfix.patch @@ -0,0 +1,17 @@ +diff -urN pine4.31.orig/pine/osdep/lstcmpnt pine4.31/pine/osdep/lstcmpnt +--- pine4.31.orig/pine/osdep/lstcmpnt Mon Oct 30 17:45:08 2000 ++++ pine4.31/pine/osdep/lstcmpnt Tue Dec 12 06:33:53 2000 +@@ -9,10 +9,10 @@ + last_cmpnt(filename) + char *filename; + { +- register char *p = NULL, *q = filename; ++ char *p = NULL, *q = filename; + +- if(!q) +- return(q); ++ if(filename == 0) ++ return 0; + + while(q = strchr(q, '/')) + if(*++q) diff --git a/net-mail/pine/files/pine-4.33-whitespace.patch b/net-mail/pine/files/pine-4.33-whitespace.patch new file mode 100644 index 000000000000..68b0159c8644 --- /dev/null +++ b/net-mail/pine/files/pine-4.33-whitespace.patch @@ -0,0 +1,11 @@ +--- pine4.30/pico/pico.c.strip Sun Jan 14 15:26:47 2001 ++++ pine4.30/pico/pico.c Sun Jan 14 15:16:44 2001 +@@ -216,7 +216,7 @@ + switch(pico_all_done){ /* prepare for/handle final events */ + case COMP_EXIT : /* already confirmed */ + packheader(); +- stripwhitespace(); ++// stripwhitespace(); + c |= COMP_EXIT; + break; + diff --git a/net-mail/pine/files/pine-4.40-boguswarning.patch b/net-mail/pine/files/pine-4.40-boguswarning.patch new file mode 100644 index 000000000000..58d426001582 --- /dev/null +++ b/net-mail/pine/files/pine-4.40-boguswarning.patch @@ -0,0 +1,11 @@ +--- imap/src/osdep/unix/env_unix.c.boguswarning Mon Jun 25 23:10:04 2001 ++++ imap/src/osdep/unix/env_unix.c Thu Oct 4 05:12:36 2001 +@@ -48,7 +48,7 @@ + /* flock() emulator is a no-op */ + static short disableFcntlLock = NIL; + /* warning on EACCES errors on .lock files */ +-static short lockEaccesError = T; ++static short lockEaccesError = NIL; + static short hideDotFiles = NIL;/* hide files whose names start with . */ + /* 1 = disable plaintext, 2 = if not SSL */ + static long disablePlaintext = NIL; diff --git a/net-mail/pine/files/pine-4.40-lockfile-perm.patch b/net-mail/pine/files/pine-4.40-lockfile-perm.patch new file mode 100644 index 000000000000..3cf564ef5f34 --- /dev/null +++ b/net-mail/pine/files/pine-4.40-lockfile-perm.patch @@ -0,0 +1,22 @@ +--- imap/src/osdep/unix/env_unix.h.lock_protection_fix Thu Oct 4 05:26:33 2001 ++++ imap/src/osdep/unix/env_unix.h Thu Oct 4 05:30:33 2001 +@@ -46,12 +46,15 @@ + + + /* +- * Attention: all sorcerer's apprentices who think that 0666 is a mistake. +- * You are wrong. Read the FAQ. Do not meddle in the affairs of wizards, +- * for they are subtle and quick to anger. ++ * Attention: all people who do not care about OS security, and think that ++ * mode 0666 is a correct. You are wrong. In modern multiuser systems, ++ * both remote and local security is critically important. Allowing 0666 ++ * lockfiles, allows all sorts of security problems to occur. Feel free to ++ * meddle with it however, if you do not care about local security. + */ + +-#define MANDATORYLOCKPROT 0666 /* don't change this */ ++/* Change this only if you do not want a secure multiuser system */ ++#define MANDATORYLOCKPROT 0600 + + /* Function prototypes */ + diff --git a/net-mail/pine/files/pine-4.44-multibyte.patch b/net-mail/pine/files/pine-4.44-multibyte.patch new file mode 100644 index 000000000000..8a6da1eea872 --- /dev/null +++ b/net-mail/pine/files/pine-4.44-multibyte.patch @@ -0,0 +1,169 @@ +--- pine4.33/pico/basic.c.orig Sun Jan 27 00:42:39 2002 ++++ pine4.33/pico/basic.c Sun Jan 27 22:55:07 2002 +@@ -42,6 +42,8 @@ + int getgoal(); + #endif + ++#include <wchar.h> ++ + + /* + * Move the cursor to the +@@ -55,6 +57,88 @@ + return (TRUE); + } + ++int ++pico_getforwardmblen(int n) { ++ int len = 0; ++ int i; ++ char* strbuf; ++ wchar_t* wstrbuf; ++ ++ if( curwp->w_dotp->l_used <= n ) ++ return n; ++ ++ if( curwp->w_doto + n >= curwp->w_dotp->l_used ) ++ return n; ++ ++ len = curwp->w_dotp->l_used - curwp->w_doto; ++ len += 1; ++ strbuf = malloc(sizeof(char)*len); ++ bzero(strbuf, len); ++ wstrbuf = malloc(sizeof(wchar_t)*len); ++ bzero(wstrbuf, len); ++ ++ len = curwp->w_dotp->l_used - curwp->w_doto; ++ for(i=0;i<len;i++) { ++ strbuf[i] = curwp->w_dotp->l_text[i+curwp->w_doto].c; ++ } ++ ++ i=0; ++ while ( i < n ) { ++ int ret = mblen(&strbuf[i], MB_CUR_MAX); ++ if( ret <= 0 ) ++ return n; ++ if( i + ret >= n ) ++ return i+ret; ++ i += ret; ++ } ++} ++ ++int ++pico_getbackmblen(int n) { ++ int len; ++ char* strbuf; ++ wchar_t* wstrbuf; ++ int i; ++ int wlen; ++ int ret; ++ ++ if( n <= 0 ) ++ return n; ++ ++ if( n >= curwp->w_doto ) ++ return curwp->w_doto; ++ ++ len = curwp->w_doto + 1; ++ strbuf = malloc(sizeof(char)*len); ++ bzero(strbuf, sizeof(char)*len); ++ wstrbuf = malloc(sizeof(wchar_t)*len); ++ bzero(wstrbuf, sizeof(wchar_t)*len); ++ ++ len = curwp->w_doto; ++ ++ for(i=0;i<len;i++) { ++ strbuf[i] = curwp->w_dotp->l_text[i].c; ++ } ++ ++ wlen = mbstowcs(wstrbuf, strbuf, len); ++ if( wlen == -1 ) { ++ free(strbuf); ++ free(wstrbuf); ++ return n; ++ } ++ ++ bzero(strbuf, sizeof(char)*len); ++ ret = wcstombs(strbuf, wstrbuf, len-n); ++ ++ free(strbuf); ++ free(wstrbuf); ++ ++ if( ret == -1 ) ++ return n; ++ ++ return len-ret; ++} ++ + /* + * Move the cursor backwards by "n" characters. If "n" is less than zero call + * "forwchar" to actually do the move. Otherwise compute the new cursor +@@ -70,7 +154,7 @@ + if (n < 0) + return (forwchar(f, -n)); + +- while (n--) { ++ while (n > 0) { + if (curwp->w_doto == 0) { + if ((lp=lback(curwp->w_dotp)) == curbp->b_linep){ + if(Pmaster && Pmaster->headents) +@@ -90,8 +174,11 @@ + curwp->w_dotp = lp; + curwp->w_doto = llength(lp); + curwp->w_flag |= WFMOVE; +- } else +- curwp->w_doto--; ++ } else { ++ int i = pico_getbackmblen(n); ++ n -= i; ++ curwp->w_doto -= i; ++ } + } + + return (TRUE); +@@ -122,7 +209,7 @@ + if (n < 0) + return (backchar(f, -n)); + +- while (n--) { ++ while (n>0) { + if (curwp->w_doto == llength(curwp->w_dotp)) { + if (curwp->w_dotp == curbp->b_linep) + return (FALSE); +@@ -131,8 +218,12 @@ + curwp->w_doto = 0; + curwp->w_flag |= WFMOVE; + } +- else +- curwp->w_doto++; ++ else { ++ int i = pico_getforwardmblen(n); ++ n -= i; ++ curwp->w_doto += i; ++ //curwp->w_doto++; ++ } + } + + return (TRUE); +--- pine4.33/pico/efunc.h.orig Sun Jan 27 21:43:16 2002 ++++ pine4.33/pico/efunc.h Sun Jan 27 22:20:05 2002 +@@ -52,6 +52,8 @@ + extern char *QuoteAttach PROTO((char *)); + + /* basic.c */ ++extern int pico_getforwardmblen PROTO((int)); ++extern int pico_getbackmblen PROTO((int)); + extern int gotobol PROTO((int, int)); + extern int backchar PROTO((int, int)); + extern int gotoeol PROTO((int, int)); +--- pine4.33/pico/line.c.orig Sun Jan 27 21:46:37 2002 ++++ pine4.33/pico/line.c Sun Jan 27 22:52:12 2002 +@@ -438,6 +438,8 @@ + register int chunk; + register WINDOW *wp; + ++ n = pico_getforwardmblen(n); ++ + if (curbp->b_mode&MDVIEW) /* don't allow this command if */ + return(rdonly()); /* we are in read only mode */ + |