diff options
author | Sebastian Pipping <sping@gentoo.org> | 2011-12-07 23:35:00 +0000 |
---|---|---|
committer | Sebastian Pipping <sping@gentoo.org> | 2011-12-07 23:35:00 +0000 |
commit | 93d41a10ae3737090326a97685680ee01fc63373 (patch) | |
tree | bd267caf0d016057408fd6e302059b82a6bc46d8 /net-mail/mpack | |
parent | Drop KDE 4.7.2 (diff) | |
download | historical-93d41a10ae3737090326a97685680ee01fc63373.tar.gz historical-93d41a10ae3737090326a97685680ee01fc63373.tar.bz2 historical-93d41a10ae3737090326a97685680ee01fc63373.zip |
net-mail/mpack: Fix sending mails (bug #171075)
Package-Manager: portage-2.1.10.39/cvs/Linux x86_64
Diffstat (limited to 'net-mail/mpack')
-rw-r--r-- | net-mail/mpack/ChangeLog | 16 | ||||
-rw-r--r-- | net-mail/mpack/Manifest | 15 | ||||
-rw-r--r-- | net-mail/mpack/files/mpack-1.6-compile.patch | 129 | ||||
-rw-r--r-- | net-mail/mpack/files/mpack-1.6-paths.patch | 95 | ||||
-rw-r--r-- | net-mail/mpack/mpack-1.6-r1.ebuild | 27 |
5 files changed, 279 insertions, 3 deletions
diff --git a/net-mail/mpack/ChangeLog b/net-mail/mpack/ChangeLog index 5a87dc414e90..2e7503e97b59 100644 --- a/net-mail/mpack/ChangeLog +++ b/net-mail/mpack/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for net-mail/mpack -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/mpack/ChangeLog,v 1.14 2010/03/29 20:03:48 grobian Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/mpack/ChangeLog,v 1.15 2011/12/07 23:34:59 sping Exp $ + +*mpack-1.6-r1 (07 Dec 2011) + + 07 Dec 2011; Sebastian Pipping <sping@gentoo.org> +mpack-1.6-r1.ebuild, + +files/mpack-1.6-compile.patch, +files/mpack-1.6-paths.patch: + The s/mktemp/mkstemp/ from <mpack-1.6-gentoo.patch> is broken: it does not + fully fix the TOCTTOU vulnerability but breaks sending of e-mails (bug + #171075). So I extracted the parts of (1) missing include, (2) wrong + prototypes and (3) system path corrections from that patch, made dedicated + files and added missing bits to each of these, and ripped the + s/mktemp/mkstemp/ part out. A proper TOCTTOU fix is left todo. It's not + trivial to do. 29 Mar 2010; Fabian Groffen <grobian@gentoo.org> mpack-1.6.ebuild: Marked ~ppc-macos, ~x86-solaris and ~sparc-solaris, bug #310751 diff --git a/net-mail/mpack/Manifest b/net-mail/mpack/Manifest index b380ae3feab5..b34ed7240a5f 100644 --- a/net-mail/mpack/Manifest +++ b/net-mail/mpack/Manifest @@ -1,10 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX mpack-1.5-malloc-fix.patch 824 RMD160 a991c4fe77bf5827b29bb3d5054fede5ebcc562f SHA1 1cfe57c2146da08b08ee224d081ad61004e09890 SHA256 1762b62ca1be741aa1a8423be80beb6a549325ab0205ae187c6c65e3b10cc1a4 AUX mpack-1.5-r1.patch 2345 RMD160 8f51138c5fb59a92c2cb8b5f0fcd80f5246bded3 SHA1 38217e9014580233d7c9e3562dd7a5ff87af42c0 SHA256 e11b8ef09f241cdd826877845691b232fedc77b1f37998d9799119986d4b89c0 +AUX mpack-1.6-compile.patch 2652 RMD160 0922d163e4af74a7de8dc70962ba37fc22cdc656 SHA1 c05cf2bdf70a6475d555259c97907539f8b655f2 SHA256 190b6a97588203d3e1527b0aa5aa68137e80ca27ce8211bdd135cca2ffd1e2bb AUX mpack-1.6-gentoo.patch 2022 RMD160 95459db0590644ae2b0acd94b05f748d2ff54820 SHA1 bd699376b38e8fa8fb9e8ff9f19513e79df928ad SHA256 7d00e9be884b8c672820b5801b46bc708f143cc93d356828044f9c1370b58feb +AUX mpack-1.6-paths.patch 2729 RMD160 1ffa7ad504ecd7a0886d81cafb0d6ca840983b6e SHA1 8b36a943d982d4c82ac601e35acf9954f9415683 SHA256 534e3e26d91bd72f3e476ccc09c3091d87b8525f5a521630b2edfe29b323ed42 DIST mpack-1.5-src.tar.Z 285360 RMD160 614c35b1f63c2a6027c978946941cd8755cba774 SHA1 1c5081edd9c7152d2a8c4585af2c5a3fc9f17d60 SHA256 78b442cf37889d56b11b368cade6e3ebe49b27d4a46fcec158669fb0b8ef1cf9 DIST mpack-1.6.tar.gz 179850 RMD160 a83330aa15437dc3ca6475cbf6e35b09ab9cef07 SHA1 7fd3a73e0f131412920b6ff34872e7e7fa03e03b SHA256 274108bb3a39982a4efc14fb3a65298e66c8e71367c3dabf49338162d207a94c EBUILD mpack-1.5-r1.ebuild 823 RMD160 ad478bfa3ced02337e2b60f3687251ea65bb79c8 SHA1 e822f24d0a9edebc1392dd0c66e83189eaa1e275 SHA256 72e1f4c835d7b188cd25f7a4e1e32c851757bda8f2c0be49e1c2a768f7d767bc EBUILD mpack-1.5.ebuild 594 RMD160 eb834291cf4120466d87712dcca4dbb30742bf51 SHA1 aff06dcf57593e4401b4b76fd40208e6d4f59779 SHA256 c9fd3a62f0610b562723e2e173dc38e9987b361685f5a6339a30e462537346c3 +EBUILD mpack-1.6-r1.ebuild 750 RMD160 a1e3f182d8366899d835398648bc0785e833234b SHA1 67c2b9a0cb731fd363a9ab0d30433fa70a455bd5 SHA256 7484e40abc7f578f141f859daf68f99ca5b4cfd74b668115f37e278ef43c3356 EBUILD mpack-1.6.ebuild 698 RMD160 757b0768b615bb5fc0589e16dbb976b29e90b7a9 SHA1 05b67313686aaa96761bc8b4c4170c5a24e9a07d SHA256 5b23f080d57b7643dab4eee7c77282b227882c566eeed30fadebf4bd131277af -MISC ChangeLog 1760 RMD160 b8fd9667c0b4d6f5ccceb492a2597131b771979a SHA1 5bf5ef3f224dddd4b731902f708955d71cfb8e26 SHA256 fe76fd22cd6d3d8efcff36821c29926b6baae7c2f6d1c61eb0979af9b3ddf008 +MISC ChangeLog 2379 RMD160 d1d5e0f9ceff318fc2a97b7f1ab3b2177c042e9e SHA1 b0712270f577a574fa1b5d3f1e95720564a4cfa4 SHA256 be6e0a7343363210f65e7327b4d7f64ec0d0e1670ce41cfb5e22830cb437566f MISC metadata.xml 161 RMD160 273e570423fa3cd9d3f15f7967a43307c8ee9661 SHA1 a1fecd2f7b169d621b88c6ccab9d758209fc8f19 SHA256 4ebf9a8f60040bfb95f13790c1d146a49c69f791f9c421e02a5d96fd6fcb2b32 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.18 (GNU/Linux) + +iEYEARECAAYFAk7f+CAACgkQsAvGakAaFgAG5ACeMeAF7OgKTbEstAnSOppCIek8 +QXkAn3j2dc3LmUSgbpfvGhbF+6fhOc+u +=fnrg +-----END PGP SIGNATURE----- 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 <sebastian@pipping.org> +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 <stdio.h> + #include <string.h> + #include <ctype.h> ++#include <stdlib.h> + #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 <stdio.h> + #include <string.h> ++#include <stdlib.h> + + 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 <stdio.h> ++#include <string.h> + + /* 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 <stdio.h> + #include <string.h> ++#include <stdlib.h> + + #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 <sys/param.h> + #include <netdb.h> + #include <fcntl.h> ++#include <stdlib.h> + #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 <stdio.h> + #include <string.h> + #include <errno.h> ++#include <stdlib.h> ++#include <unistd.h> + #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 <stdio.h> ++#include <stdlib.h> + #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 <stdio.h> + #include <string.h> +-extern char *malloc(), *realloc(); ++#include <stdlib.h> + + char *xmalloc (int size) + { +-- +1.7.8 + 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 <sebastian@pipping.org> +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/mpack-1.6-r1.ebuild b/net-mail/mpack/mpack-1.6-r1.ebuild new file mode 100644 index 000000000000..bfdce0a2619a --- /dev/null +++ b/net-mail/mpack/mpack-1.6-r1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/mpack/mpack-1.6-r1.ebuild,v 1.1 2011/12/07 23:34:59 sping Exp $ + +EAPI="3" + +inherit eutils + +DESCRIPTION="Command-line MIME encoding and decoding utilities" +HOMEPAGE="ftp://ftp.andrew.cmu.edu/pub/mpack/" +SRC_URI="ftp://ftp.andrew.cmu.edu/pub/mpack/${P}.tar.gz" + +SLOT="0" +LICENSE="as-is" +KEYWORDS="~amd64 ~sparc ~x86 ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="" + +src_prepare() { + # NOTE: These two patches replace <mpack-1.6-gentoo.patch> + epatch "${FILESDIR}"/${P}-compile.patch + epatch "${FILESDIR}"/${P}-paths.patch +} + +src_install () { + make DESTDIR=${D} install || die + dodoc README.* Changes +} |