From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-mail/mpack/files/mpack-1.6-clang.patch | 11 ++ net-mail/mpack/files/mpack-1.6-compile.patch | 129 +++++++++++++++++++++ net-mail/mpack/files/mpack-1.6-cve-2011-4919.patch | 28 +++++ net-mail/mpack/files/mpack-1.6-filenames.patch | 30 +++++ net-mail/mpack/files/mpack-1.6-gentoo.patch | 69 +++++++++++ net-mail/mpack/files/mpack-1.6-munpack.patch | 55 +++++++++ net-mail/mpack/files/mpack-1.6-paths.patch | 95 +++++++++++++++ net-mail/mpack/files/mpack-1.6-usage.patch | 25 ++++ 8 files changed, 442 insertions(+) create mode 100644 net-mail/mpack/files/mpack-1.6-clang.patch create mode 100644 net-mail/mpack/files/mpack-1.6-compile.patch create mode 100644 net-mail/mpack/files/mpack-1.6-cve-2011-4919.patch create mode 100644 net-mail/mpack/files/mpack-1.6-filenames.patch create mode 100644 net-mail/mpack/files/mpack-1.6-gentoo.patch create mode 100644 net-mail/mpack/files/mpack-1.6-munpack.patch create mode 100644 net-mail/mpack/files/mpack-1.6-paths.patch create mode 100644 net-mail/mpack/files/mpack-1.6-usage.patch (limited to 'net-mail/mpack/files') diff --git a/net-mail/mpack/files/mpack-1.6-clang.patch b/net-mail/mpack/files/mpack-1.6-clang.patch new file mode 100644 index 000000000000..fc21d170af5f --- /dev/null +++ b/net-mail/mpack/files/mpack-1.6-clang.patch @@ -0,0 +1,11 @@ +--- umpack-1.6/udecode.c 2003-07-21 20:46:37.000000000 +0000 ++++ mpack-1.6/uudecode.c 2014-04-19 10:04:19.000000000 +0000 +@@ -845,7 +845,7 @@ + } + line += 4; + } +- return; ++ return 0; + } + + diff --git a/net-mail/mpack/files/mpack-1.6-compile.patch b/net-mail/mpack/files/mpack-1.6-compile.patch new file mode 100644 index 000000000000..570319cabe55 --- /dev/null +++ b/net-mail/mpack/files/mpack-1.6-compile.patch @@ -0,0 +1,129 @@ +From a01468c1734129595355af0815d4577af4e265cc Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Wed, 7 Dec 2011 23:22:55 +0100 +Subject: [PATCH] Add missing includes, remove conflicting prototypes + +--- + decode.c | 1 + + encode.c | 1 + + magic.c | 1 + + part.c | 1 + + unixos.c | 5 +---- + unixpk.c | 2 ++ + unixpk.o | Bin 12000 -> 12016 bytes + unixunpk.c | 1 + + xmalloc.c | 2 +- + 9 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/decode.c b/decode.c +index c96918f..8b8df56 100644 +--- a/decode.c ++++ b/decode.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include "xmalloc.h" + #include "common.h" + #include "part.h" +diff --git a/encode.c b/encode.c +index 0ba3934..1377cf8 100644 +--- a/encode.c ++++ b/encode.c +@@ -24,6 +24,7 @@ + */ + #include + #include ++#include + + extern char *magic_look(FILE *infile); + extern char *os_genid(void); +diff --git a/magic.c b/magic.c +index e08c6f8..a452a43 100644 +--- a/magic.c ++++ b/magic.c +@@ -23,6 +23,7 @@ + * SOFTWARE. + */ + #include ++#include + + /* Description of the various file formats and their magic numbers */ + struct magic { +diff --git a/part.c b/part.c +index 1d4efe6..15fd724 100644 +--- a/part.c ++++ b/part.c +@@ -28,6 +28,7 @@ + + #include + #include ++#include + + #include "part.h" + #include "xmalloc.h" +diff --git a/unixos.c b/unixos.c +index 3f5c4c0..fa6d0a7 100644 +--- a/unixos.c ++++ b/unixos.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include "xmalloc.h" + #include "common.h" + #include "part.h" +@@ -38,10 +39,6 @@ + #define MAXHOSTNAMELEN 64 + #endif + +-extern int errno; +-extern char *malloc(); +-extern char *getenv(); +- + int overwrite_files = 0; + int didchat; + +diff --git a/unixpk.c b/unixpk.c +index c2aaa56..1f81ea9 100644 +--- a/unixpk.c ++++ b/unixpk.c +@@ -25,6 +25,8 @@ + #include + #include + #include ++#include ++#include + #include "common.h" + #include "version.h" + #include "xmalloc.h" +diff --git a/unixunpk.c b/unixunpk.c +index a1f065b..0f5fa85 100644 +--- a/unixunpk.c ++++ b/unixunpk.c +@@ -23,6 +23,7 @@ + * SOFTWARE. + */ + #include ++#include + #include "version.h" + #include "part.h" + +diff --git a/xmalloc.c b/xmalloc.c +index 7c74360..46dbbd1 100644 +--- a/xmalloc.c ++++ b/xmalloc.c +@@ -24,7 +24,7 @@ + */ + #include + #include +-extern char *malloc(), *realloc(); ++#include + + char *xmalloc (int size) + { +-- +1.7.8 + diff --git a/net-mail/mpack/files/mpack-1.6-cve-2011-4919.patch b/net-mail/mpack/files/mpack-1.6-cve-2011-4919.patch new file mode 100644 index 000000000000..62a04faa7936 --- /dev/null +++ b/net-mail/mpack/files/mpack-1.6-cve-2011-4919.patch @@ -0,0 +1,28 @@ +From 0c87201f64491575350b18d04c62ec142e119d1f Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Sat, 31 Dec 2011 20:17:20 +0100 +Subject: [PATCH] Fix permissions + +--- + unixos.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/unixos.c b/unixos.c +index fa6d0a7..0e2f469 100644 +--- a/unixos.c ++++ b/unixos.c +@@ -134,9 +134,9 @@ FILE *os_createnewfile(char *fname) + FILE *ret; + + #ifdef O_EXCL +- fd=open(fname, O_RDWR|O_CREAT|O_EXCL, 0644); ++ fd=open(fname, O_RDWR|O_CREAT|O_EXCL, 0600); + #else +- fd=open(fname, O_RDWR|O_CREAT|O_TRUNC, 0644); ++ fd=open(fname, O_RDWR|O_CREAT|O_TRUNC, 0600); + #endif + + if (fd == -1) +-- +1.7.8.1 + diff --git a/net-mail/mpack/files/mpack-1.6-filenames.patch b/net-mail/mpack/files/mpack-1.6-filenames.patch new file mode 100644 index 000000000000..6a1fc225a791 --- /dev/null +++ b/net-mail/mpack/files/mpack-1.6-filenames.patch @@ -0,0 +1,30 @@ +From 10aad11d7baf7044328fff616b9c6f1859bd2cbd Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Sun, 8 Jan 2012 17:36:20 +0100 +Subject: [PATCH 1/2] Use actual filenames for unpacking (rather than + "part[0-9]+") + +Example: +# curl http://pbot.rmdir.de/b224d87617c5d76d6cd938bd4410fabf | ./munpack +--- + decode.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/decode.c b/decode.c +index 8b8df56..7349abd 100644 +--- a/decode.c ++++ b/decode.c +@@ -546,8 +546,8 @@ getDispositionFilename(char *disposition) + SkipWhitespace(&disposition); + if (!disposition) return 0; + +- /* If we're looking at a ";", we found what we're looking for */ +- if (*disposition++ == ';') break; ++ /* If we're looking at a "=", we found what we're looking for */ ++ if (*disposition++ == '=') break; + } + + SkipWhitespace(&disposition); +-- +1.7.8.3 + diff --git a/net-mail/mpack/files/mpack-1.6-gentoo.patch b/net-mail/mpack/files/mpack-1.6-gentoo.patch new file mode 100644 index 000000000000..faf72eb67e7a --- /dev/null +++ b/net-mail/mpack/files/mpack-1.6-gentoo.patch @@ -0,0 +1,69 @@ +diff -bur mpack-1.6-orig/unixos.c mpack-1.6/unixos.c +--- mpack-1.6-orig/unixos.c 2007-03-11 02:02:02.000000000 +0100 ++++ mpack-1.6/unixos.c 2007-03-11 02:04:48.000000000 +0100 +@@ -39,7 +39,7 @@ + #endif + + extern int errno; +-extern char *malloc(); ++extern void *malloc(); + extern char *getenv(); + + int overwrite_files = 0; +@@ -90,7 +90,7 @@ + strcpy(buf, getenv("TMPDIR")); + } + else { +- strcpy(buf, "/usr/tmp"); ++ strcpy(buf, "/var/tmp"); + } + strcat(buf, "/m-prts-"); + p = getenv("USER"); +diff -bur mpack-1.6-orig/unixpk.c mpack-1.6/unixpk.c +--- mpack-1.6-orig/unixpk.c 2007-03-11 02:02:02.000000000 +0100 ++++ mpack-1.6/unixpk.c 2007-03-11 02:14:02.000000000 +0100 +@@ -167,7 +167,7 @@ + strcpy(fnamebuf, "/usr/tmp"); + } + strcat(fnamebuf, "/mpackXXXXXX"); +- mktemp(fnamebuf); ++ mkstemp(fnamebuf); + outfname = strsave(fnamebuf); + } + +diff -bur mpack-1.6-orig/unixpk.man mpack-1.6/unixpk.man +--- mpack-1.6-orig/unixpk.man 2007-03-11 02:02:02.000000000 +0100 ++++ mpack-1.6/unixpk.man 2007-03-11 02:14:13.000000000 +0100 +@@ -136,7 +136,7 @@ + .SH ENVIRONMENT + .TP + .B TMPDIR +-Directory to store temporary files. Default is /usr/tmp. ++Directory to store temporary files. Default is /var/tmp. + .TP + .B SPLITSIZE + Default value of the -m switch. +diff -bur mpack-1.6-orig/unixunpk.man mpack-1.6/unixunpk.man +--- mpack-1.6-orig/unixunpk.man 2007-03-11 02:02:02.000000000 +0100 ++++ mpack-1.6/unixunpk.man 2007-03-11 02:03:14.000000000 +0100 +@@ -107,7 +107,7 @@ + .SH ENVIRONMENT + .TP + .B TMPDIR +-Directory to store temporary files. Default is /usr/tmp. ++Directory to store temporary files. Default is /var/tmp. + .SH FILES + .TP + .B $TMPDIR/m-prts-$USER/ +diff -bur mpack-1.6-orig/xmalloc.c mpack-1.6/xmalloc.c +--- mpack-1.6-orig/xmalloc.c 2007-03-11 02:02:02.000000000 +0100 ++++ mpack-1.6/xmalloc.c 2007-03-11 02:04:29.000000000 +0100 +@@ -24,7 +24,7 @@ + */ + #include + #include +-extern char *malloc(), *realloc(); ++extern void *malloc(), *realloc(); + + char *xmalloc (int size) + { diff --git a/net-mail/mpack/files/mpack-1.6-munpack.patch b/net-mail/mpack/files/mpack-1.6-munpack.patch new file mode 100644 index 000000000000..9d5c8af6e814 --- /dev/null +++ b/net-mail/mpack/files/mpack-1.6-munpack.patch @@ -0,0 +1,55 @@ +From a4ececa89969adfa53c30878b21178e1427cb6c5 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Wed, 18 Jan 2012 05:22:25 +0100 +Subject: [PATCH] Fix unpacking of multiple parts + +The problem was reported by Dirk Meyer of FreeBSD. + +He shared these commands to reproduce: +$ ./mpack -s Subject -m 1700 -o zparts md5c.c +$ ./munpack zparts.* +--- + decode.c | 2 +- + unixos.c | 13 +++++++++++++ + 2 files changed, 14 insertions(+), 1 deletions(-) + +diff --git a/decode.c b/decode.c +index 7349abd..e8e8d56 100644 +--- a/decode.c ++++ b/decode.c +@@ -633,7 +633,7 @@ int handlePartial(struct part *inpart, char *headers, params contentParams, int + } + /* Store number of parts in reassembly directory */ + sprintf(buf, "%sCT", dir); +- partfile = os_createnewfile(buf); ++ partfile = os_resetfile(buf); + if (!partfile) { + os_perror(buf); + goto ignore; +diff --git a/unixos.c b/unixos.c +index 0e2f469..1650594 100644 +--- a/unixos.c ++++ b/unixos.c +@@ -146,6 +146,19 @@ FILE *os_createnewfile(char *fname) + return ret; + } + ++FILE *os_resetfile(char *fname) ++{ ++ int fd; ++ FILE *ret; ++ ++ fd=open(fname, O_RDWR|O_CREAT|O_TRUNC, 0600); ++ if (fd == -1) ++ return NULL; ++ ++ ret=fdopen(fd, "w"); ++ return ret; ++} ++ + + /* + * Create a new file, with suggested filename "fname". +-- +1.7.8.3 + diff --git a/net-mail/mpack/files/mpack-1.6-paths.patch b/net-mail/mpack/files/mpack-1.6-paths.patch new file mode 100644 index 000000000000..0dc2de8b2123 --- /dev/null +++ b/net-mail/mpack/files/mpack-1.6-paths.patch @@ -0,0 +1,95 @@ +From b857da37ec211e4472070c9e870aa5a0b827563b Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Thu, 8 Dec 2011 00:09:03 +0100 +Subject: [PATCH] Use /var/tmp rather than /usr/tmp + +--- + README.unix | 2 +- + mkreadme.pl | 2 +- + unixos.c | 2 +- + unixpk.c | 2 +- + unixpk.man | 2 +- + unixunpk.man | 2 +- + 8 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/README.unix b/README.unix +index d7a762c..c26b7c8 100644 +--- a/README.unix ++++ b/README.unix +@@ -188,7 +188,7 @@ The environment variables which control munpack's behavior are: + + TMPDIR + Root of directory to store partial messages awaiting +- reassembly. Default is "/usr/tmp". Partial messages ++ reassembly. Default is "/var/tmp". Partial messages + are stored in subdirectories of $TMPDIR/m-prts-$USER/ + + +diff --git a/mkreadme.pl b/mkreadme.pl +index a45117b..22e4e81 100755 +--- a/mkreadme.pl ++++ b/mkreadme.pl +@@ -413,7 +413,7 @@ The environment variables which control munpack's behavior are: + =unix + TMPDIR + Root of directory to store partial messages awaiting +- reassembly. Default is "/usr/tmp". Partial messages ++ reassembly. Default is "/var/tmp". Partial messages + are stored in subdirectories of $TMPDIR/m-prts-$USER/ + + =pc os2 +diff --git a/unixos.c b/unixos.c +index 2243d12..fa6d0a7 100644 +--- a/unixos.c ++++ b/unixos.c +@@ -87,7 +87,7 @@ char *os_idtodir(char *id) + strcpy(buf, getenv("TMPDIR")); + } + else { +- strcpy(buf, "/usr/tmp"); ++ strcpy(buf, "/var/tmp"); + } + strcat(buf, "/m-prts-"); + p = getenv("USER"); +diff --git a/unixpk.c b/unixpk.c +index 3605dd1..0bae849 100644 +--- a/unixpk.c ++++ b/unixpk.c +@@ -166,7 +166,7 @@ int main(int argc, char **argv) + strcpy(fnamebuf, getenv("TMPDIR")); + } + else { +- strcpy(fnamebuf, "/usr/tmp"); ++ strcpy(fnamebuf, "/var/tmp"); + } + strcat(fnamebuf, "/mpackXXXXXX"); + mktemp(fnamebuf); +diff --git a/unixpk.man b/unixpk.man +index de251ee..c4c9313 100644 +--- a/unixpk.man ++++ b/unixpk.man +@@ -136,7 +136,7 @@ Mail the generated messages to the specified addresses. + .SH ENVIRONMENT + .TP + .B TMPDIR +-Directory to store temporary files. Default is /usr/tmp. ++Directory to store temporary files. Default is /var/tmp. + .TP + .B SPLITSIZE + Default value of the -m switch. +diff --git a/unixunpk.man b/unixunpk.man +index da384b1..8c9ab7e 100644 +--- a/unixunpk.man ++++ b/unixunpk.man +@@ -107,7 +107,7 @@ see the section "OPTIONS" above. + .SH ENVIRONMENT + .TP + .B TMPDIR +-Directory to store temporary files. Default is /usr/tmp. ++Directory to store temporary files. Default is /var/tmp. + .SH FILES + .TP + .B $TMPDIR/m-prts-$USER/ +-- +1.7.8 + diff --git a/net-mail/mpack/files/mpack-1.6-usage.patch b/net-mail/mpack/files/mpack-1.6-usage.patch new file mode 100644 index 000000000000..f4f07e530ee9 --- /dev/null +++ b/net-mail/mpack/files/mpack-1.6-usage.patch @@ -0,0 +1,25 @@ +From 74fd172db4961ab07f134a60cd88955fb170f11d Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Sun, 8 Jan 2012 17:39:51 +0100 +Subject: [PATCH 2/2] Mention parameter -t in usage output + +--- + unixunpk.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/unixunpk.c b/unixunpk.c +index 0f5fa85..1320b70 100644 +--- a/unixunpk.c ++++ b/unixunpk.c +@@ -101,7 +101,7 @@ int main(int argc, char **argv) + + void usage(void) { + fprintf(stderr, "munpack version %s\n", MPACK_VERSION); +- fprintf(stderr, "usage: munpack [-f] [-q] [-C directory] [files...]\n"); ++ fprintf(stderr, "usage: munpack [-f] [-q] [-t] [-C directory] [files...]\n"); + exit(1); + } + +-- +1.7.8.3 + -- cgit v1.2.3