diff options
author | Sergey Popov <pinkbyte@gentoo.org> | 2013-11-25 18:00:03 +0000 |
---|---|---|
committer | Sergey Popov <pinkbyte@gentoo.org> | 2013-11-25 18:00:03 +0000 |
commit | 4aea1e53565f2673bb7dbe6718024c73eedc8345 (patch) | |
tree | faeffb3ba3df900c0e9d2989b8b5f6b66c146556 /app-arch | |
parent | Add upstream patch which fixes build when LINGUAS is empty, bug #492460. (diff) | |
download | gentoo-2-4aea1e53565f2673bb7dbe6718024c73eedc8345.tar.gz gentoo-2-4aea1e53565f2673bb7dbe6718024c73eedc8345.tar.bz2 gentoo-2-4aea1e53565f2673bb7dbe6718024c73eedc8345.zip |
Security cleanup, wrt bug #81958
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x1F357D42)
Diffstat (limited to 'app-arch')
-rw-r--r-- | app-arch/unace/ChangeLog | 10 | ||||
-rw-r--r-- | app-arch/unace/files/unace-1.2b-64bit-fmt.patch | 20 | ||||
-rw-r--r-- | app-arch/unace/files/unace-1.2b-64bit.patch | 56 | ||||
-rw-r--r-- | app-arch/unace/files/unace-1.2b-CAN-2005-0160-CAN-2005-0161.patch | 167 | ||||
-rw-r--r-- | app-arch/unace/files/unace-1.2b-aliasing.patch | 20 | ||||
-rw-r--r-- | app-arch/unace/files/unace-2.5-endianness-detection.patch | 26 | ||||
-rw-r--r-- | app-arch/unace/unace-1.2b-r1.ebuild | 42 | ||||
-rw-r--r-- | app-arch/unace/unace-1.2b-r2.ebuild | 47 | ||||
-rw-r--r-- | app-arch/unace/unace-2.5-r1.ebuild | 34 | ||||
-rw-r--r-- | app-arch/unace/unace-2.5-r2.ebuild | 35 | ||||
-rw-r--r-- | app-arch/unace/unace-2.5.ebuild | 22 |
11 files changed, 9 insertions, 470 deletions
diff --git a/app-arch/unace/ChangeLog b/app-arch/unace/ChangeLog index 31206a8b19a1..38a341963b36 100644 --- a/app-arch/unace/ChangeLog +++ b/app-arch/unace/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-arch/unace # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/unace/ChangeLog,v 1.54 2013/04/02 13:22:40 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-arch/unace/ChangeLog,v 1.55 2013/11/25 18:00:03 pinkbyte Exp $ + + 25 Nov 2013; Sergey Popov <pinkbyte@gentoo.org> -unace-1.2b-r1.ebuild, + -unace-1.2b-r2.ebuild, -files/unace-1.2b-64bit.patch, + -files/unace-1.2b-64bit-fmt.patch, + -files/unace-1.2b-CAN-2005-0160-CAN-2005-0161.patch, + -files/unace-1.2b-aliasing.patch, -unace-2.5.ebuild, -unace-2.5-r1.ebuild, + -unace-2.5-r2.ebuild, -files/unace-2.5-endianness-detection.patch: + Security cleanup, wrt bug #81958 02 Apr 2013; Agostino Sarubbo <ago@gentoo.org> unace-2.5-r3.ebuild: Stable for s390, wrt bug #81958 diff --git a/app-arch/unace/files/unace-1.2b-64bit-fmt.patch b/app-arch/unace/files/unace-1.2b-64bit-fmt.patch deleted file mode 100644 index a7cdff7aca30..000000000000 --- a/app-arch/unace/files/unace-1.2b-64bit-fmt.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- unace/unace.c -+++ unace/unace.c -@@ -516,7 +516,7 @@ - tpsize+= fhead.PSIZE; - } - if (!f_err) -- printf("%02u.%02u.%02u|%02u:%02u|%c%c%9lu|%9lu|%4u%%|%c%s\n", -+ printf("%02u.%02u.%02u|%02u:%02u|%c%c%9u|%9u|%4u%%|%c%s\n", - ts_day (ti), ts_month(ti), ts_year(ti)%100, - ts_hour(ti), ts_min (ti), - fhead.HEAD_FLAGS & ACE_SP_BEF ? '<' : ' ', -@@ -529,7 +529,7 @@ - } - if (!f_err) - { -- printf("\n %9lu|%9lu|%4u%%| %u file%s", -+ printf("\n %9u|%9u|%4u%%| %u file%s", - psize, - size, - percentage(psize, size), diff --git a/app-arch/unace/files/unace-1.2b-64bit.patch b/app-arch/unace/files/unace-1.2b-64bit.patch deleted file mode 100644 index a90fc2752134..000000000000 --- a/app-arch/unace/files/unace-1.2b-64bit.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -ur unace/declare.h unace-fixed/declare.h ---- unace/declare.h 2002-08-24 01:17:19.000000000 +0200 -+++ unace-fixed/declare.h 2005-06-05 12:23:11.000000000 +0200 -@@ -7,6 +7,23 @@ - #ifndef __declare_h - #define __declare_h - -+#ifdef UNIX -+ -+#include <inttypes.h> -+ -+typedef uint16_t USHORT; -+typedef int16_t SHORT ; -+typedef uint16_t UWORD ; -+typedef int16_t WORD ; -+typedef uint32_t ULONG ; -+typedef int32_t LONG ; -+typedef uint8_t UCHAR ; -+typedef int8_t CHAR ; -+typedef unsigned UINT ; -+typedef int INT ; -+ -+#else /* UNIX */ -+ - #ifdef AMIGA - - #include <exec/types.h> -@@ -27,6 +44,7 @@ - typedef unsigned UINT ; - typedef int INT ; - -+#endif /* UNIX */ - - #endif /* __declare_h */ - -diff -ur unace/unace.c unace-fixed/unace.c ---- unace/unace.c 2005-06-05 12:21:43.000000000 +0200 -+++ unace-fixed/unace.c 2005-06-05 12:24:39.000000000 +0200 -@@ -516,7 +516,7 @@ - tpsize+= fhead.PSIZE; - } - if (!f_err) -- printf("%02u.%02u.%02u|%02u:%02u|%c%c%9lu|%9lu|%4u%%|%c%s\n", -+ printf("%02u.%02u.%02u|%02u:%02u|%c%c%9u|%9u|%4u%%|%c%s\n", - ts_day (ti), ts_month(ti), ts_year(ti)%100, - ts_hour(ti), ts_min (ti), - fhead.HEAD_FLAGS & ACE_SP_BEF ? '<' : ' ', -@@ -529,7 +529,7 @@ - } - if (!f_err) - { -- printf("\n %9lu|%9lu|%4u%%| %u file%s", -+ printf("\n %9u|%9u|%4u%%| %u file%s", - psize, - size, - percentage(psize, size), diff --git a/app-arch/unace/files/unace-1.2b-CAN-2005-0160-CAN-2005-0161.patch b/app-arch/unace/files/unace-1.2b-CAN-2005-0160-CAN-2005-0161.patch deleted file mode 100644 index c9c2dd551702..000000000000 --- a/app-arch/unace/files/unace-1.2b-CAN-2005-0160-CAN-2005-0161.patch +++ /dev/null @@ -1,167 +0,0 @@ ---- uac_crt.h.old 1998-07-01 10:29:00.000000000 +0200 -+++ uac_crt.h 2005-02-14 00:48:35.000000000 +0100 -@@ -4,7 +4,7 @@ - - #include "acestruc.h" - --CHAR *ace_fname(CHAR * s, thead * head, INT nopath); -+CHAR *ace_fname(CHAR * s, thead * head, INT nopath, unsigned int size); - INT create_dest_file(CHAR * file, INT a); - - #ifdef UNIX ---- uac_crt.c.old 1998-07-01 10:29:00.000000000 +0200 -+++ uac_crt.c 2005-02-14 02:46:02.000000000 +0100 -@@ -33,12 +33,15 @@ - - /* gets file name from header - */ --CHAR *ace_fname(CHAR * s, thead * head, INT nopath) -+CHAR *ace_fname(CHAR * s, thead * head, INT nopath, unsigned int size) - { -- INT i; -+ unsigned int i; - char *cp; - -- strncpy(s, (*(tfhead *) head).FNAME, i = (*(tfhead *) head).FNAME_SIZE); -+ i = (*(tfhead *) head).FNAME_SIZE; -+ if (i > (size - 1)) -+ i = size - 1; -+ strncpy(s, (*(tfhead *) head).FNAME, i); - s[i] = 0; - - if (nopath) -@@ -56,22 +59,72 @@ CHAR *ace_fname(CHAR * s, thead * head, - } - #endif - -+ cp = s; -+ while (*cp == '/') cp++; -+ if (cp != s) -+ memmove(s, cp, strlen(cp) + 1); -+ - return s; - } - -+int is_directory_traversal(char *str) -+{ -+ unsigned int mode, countdots; -+ /* mode 0 = fresh, 1 = just dots, 2 = not just dots */ -+ char ch; -+ -+ mode = countdots = 0; -+ -+ while (ch = *str++) -+ { -+ if ((ch == '/') && (mode == 1) && (countdots > 1)) -+ return 1; -+ -+ if (ch == '/') -+ { -+ mode = countdots = 0; -+ continue; -+ } -+ -+ if (ch == '.') -+ { -+ if (mode == 0) -+ mode = 1; -+ -+ countdots++; -+ } -+ else -+ mode = 2; -+ } -+ -+ if ((mode == 1) && (countdots > 1)) -+ return 1; -+ -+ return 0; -+} -+ - void check_ext_dir(CHAR * f) // checks/creates path of file - { - CHAR *cp, - d[PATH_MAX]; -- INT i; -+ unsigned int i; - - d[0] = 0; - -+ if (is_directory_traversal(f)) -+ { -+ f_err = ERR_WRITE; -+ printf("\n Directory traversal attempt: %s\n", f); -+ return; -+ } -+ - for (;;) - { - if ((cp = (CHAR *) strchr(&f[strlen(d) + 1], DIRSEP))!=NULL) - { - i = cp - f; -+ if (i > (PATH_MAX - 1)) -+ i = PATH_MAX - 1; - strncpy(d, f, i); - d[i] = 0; - } ---- unace.c.old 1998-07-01 10:29:00.000000000 +0200 -+++ unace.c 2005-02-14 01:43:28.000000000 +0100 -@@ -240,6 +240,7 @@ INT read_arc_head(void) // searc - INT open_archive(INT print_err) // opens archive (or volume) - { - CHAR av_str[80]; -+ unsigned int copylen; - - archan = open(aname, O_RDONLY | O_BINARY); // open file - -@@ -263,8 +264,11 @@ INT open_archive(INT print_err) - sprintf(av_str, "\ncreated on %d.%d.%d by ", - ts_day(adat.time_cr), ts_month(adat.time_cr), ts_year(adat.time_cr)); - printf(av_str); -- strncpy(av_str, mhead.AV, mhead.AV_SIZE); -- av_str[mhead.AV_SIZE] = 0; -+ copylen = mhead.AV_SIZE; -+ if (copylen > 79) -+ copylen = 79; -+ strncpy(av_str, mhead.AV, copylen); -+ av_str[copylen] = 0; - printf("%s\n\n", av_str); - } - comment_out("Main comment:"); // print main comment -@@ -300,7 +304,7 @@ void get_next_volname(void) - INT proc_vol(void) // opens volume - { - INT i; -- CHAR s[80]; -+ CHAR s[PATH_MAX + 80]; - - // if f_allvol_pr is 2 we have -y and should never ask - if ((!fileexists_insense(aname) && f_allvol_pr != 2) || !f_allvol_pr) -@@ -428,7 +432,7 @@ void extract_files(int nopath, int test) - if (head.HEAD_TYPE == FILE_BLK) - { - comment_out("File comment:"); // show file comment -- ace_fname(file, &head, nopath); // get file name -+ ace_fname(file, &head, nopath, sizeof(file)); // get file name - printf("\n%s", file); - flush; - dcpr_init_file(); // initialize decompression of file -@@ -496,7 +500,7 @@ void list_files(int verbose) - if (head.HEAD_TYPE == FILE_BLK) - { - ULONG ti=fhead.FTIME; -- ace_fname(file, &head, verbose ? 0 : 1); // get file name -+ ace_fname(file, &head, verbose ? 0 : 1, sizeof(file)); // get file name - - size += fhead.SIZE; - psize += -@@ -588,7 +592,8 @@ int main(INT argc, CHAR * argv[]) - - init_unace(); // initialize unace - -- strcpy(aname, argv[arg_cnt]); // get archive name -+ strncpy(aname, argv[arg_cnt], sizeof(aname) - 4); // get archive name -+ aname[sizeof(aname) - 5] = '\0'; - if (!(s = (CHAR *) strrchr(aname, DIRSEP))) - s = aname; - if (!strrchr(s, '.')) diff --git a/app-arch/unace/files/unace-1.2b-aliasing.patch b/app-arch/unace/files/unace-1.2b-aliasing.patch deleted file mode 100644 index ccd7f57c4f98..000000000000 --- a/app-arch/unace/files/unace-1.2b-aliasing.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/portable.h -+++ b/portable.h -@@ -79,11 +79,13 @@ - - #else /* HI_LO_BYTE_ORDER */ - --#define BUFP2WORD(p) *(UWORD*)((p+=2)-2) --#define BUFP2LONG(p) *(ULONG*)((p+=4)-4) -+#define _MAGIC_UNION(type, p) ({ union { UCHAR *_c; type *_u; } _x = { ._c = (p) }; *_x._u; }) - --#define BUF2WORD(p) (*(UWORD*)p) --#define BUF2LONG(p) (*(ULONG*)p) -+#define BUFP2WORD(p) _MAGIC_UNION(UWORD, ((p+=2)-2)) -+#define BUFP2LONG(p) _MAGIC_UNION(ULONG, ((p+=4)-4)) -+ -+#define BUF2WORD(p) _MAGIC_UNION(UWORD, p) -+#define BUF2LONG(p) _MAGIC_UNION(ULONG, p) - - #endif /* !HI_LO_BYTE_ORDER */ - diff --git a/app-arch/unace/files/unace-2.5-endianness-detection.patch b/app-arch/unace/files/unace-2.5-endianness-detection.patch deleted file mode 100644 index 3a574a6b90ba..000000000000 --- a/app-arch/unace/files/unace-2.5-endianness-detection.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -uNr unace-2.5.orig/source/base/all/all.h unace-2.5/source/base/all/all.h ---- unace-2.5.orig/source/base/all/all.h 2010-08-03 14:22:49.809269706 +0000 -+++ unace-2.5/source/base/all/all.h 2010-08-03 14:29:10.189469638 +0000 -@@ -61,7 +61,7 @@ - #define put_unaligned(ptr, val) ((void)( *(ptr) = (val) )) - #endif /* __EMULATE_UNALIGNED__ */ - --#ifdef __BIG_ENDIAN__ -+#if __BYTE_ORDER == __BIG_ENDIAN - #define ADJUST_ENDIANNESS16(Ptr) {\ - USHORT x = get_unaligned((USHORT*) (Ptr));\ - put_unaligned((USHORT*) (Ptr), x >> 8 | x << 8);\ -@@ -78,10 +78,12 @@ - x2 = x2 >> 16 | x2 << 16;\ - put_unaligned(((ULONG*) (Ptr)), (x2&0xff00ff00) >> 8 | (x2&0x00ff00ff) << 8);\ - } --#else -+#elif __BYTE_ORDER == __LITTLE_ENDIAN - #define ADJUST_ENDIANNESS16(Ptr) - #define ADJUST_ENDIANNESS32(Ptr) - #define ADJUST_ENDIANNESS64(Ptr) -+#else -+#error Please define system endianness - #endif - - #endif diff --git a/app-arch/unace/unace-1.2b-r1.ebuild b/app-arch/unace/unace-1.2b-r1.ebuild deleted file mode 100644 index f0fc0927be76..000000000000 --- a/app-arch/unace/unace-1.2b-r1.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/unace/unace-1.2b-r1.ebuild,v 1.14 2007/09/17 01:09:44 jer Exp $ - -inherit eutils - -DESCRIPTION="ACE unarchiver" -HOMEPAGE="http://www.winace.com/" -SRC_URI="http://wilma.vub.ac.be/~pdewacht/${P}.tar.gz" - -LICENSE="GPL-2" #92846 -SLOT="1" -KEYWORDS="~alpha amd64 hppa ppc ppc64 s390 x86" -IUSE="" - -DEPEND="" - -S=${WORKDIR}/${PN} - -src_unpack() { - unpack ${A} - cd "${S}" - cp unix/makefile . - cp unix/gccmaked . - epatch "${FILESDIR}"/unace-1.2b-CAN-2005-0160-CAN-2005-0161.patch - epatch "${FILESDIR}"/unace-1.2b-64bit.patch -} - -src_compile() { - sed -i \ - -e "s/^CFLAGS = -O.*/CFLAGS = -Wall ${CFLAGS}/g" \ - -e "s/-DCASEINSENSE//g" \ - makefile - - emake dep || die - emake || die -} - -src_install() { - dobin unace || die - dodoc readme.txt changes.log -} diff --git a/app-arch/unace/unace-1.2b-r2.ebuild b/app-arch/unace/unace-1.2b-r2.ebuild deleted file mode 100644 index dd1c5451e2c2..000000000000 --- a/app-arch/unace/unace-1.2b-r2.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/unace/unace-1.2b-r2.ebuild,v 1.1 2013/03/28 03:07:37 vapier Exp $ - -EAPI="4" - -inherit eutils toolchain-funcs - -DEB_VER="10" -DESCRIPTION="ACE unarchiver" -HOMEPAGE="http://www.winace.com/" -SRC_URI="mirror://debian/pool/main/u/${PN}/${PN}_${PV}.orig.tar.gz - mirror://debian/pool/main/u/${PN}/${PN}_${PV}-${DEB_VER}.debian.tar.gz" - -LICENSE="GPL-2" #92846 -SLOT="1" -KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~s390 ~x86" -IUSE="" - -S=${WORKDIR}/${PN}${PV} - -src_prepare() { - epatch $(sed 's:^:../debian/patches/:' "${WORKDIR}"/debian/patches/series) - epatch "${FILESDIR}"/${P}-64bit-fmt.patch - epatch "${FILESDIR}"/${P}-aliasing.patch - cp unix/{makefile,gccmaked} . || die -} - -src_configure() { - sed -i \ - -e '/^OSTYPE =/s:=.*:= Linux:' \ - -e "/^CFLAGS =/s:=.*:+= -Wall:" \ - -e "/^CC =/s:=.*:= $(tc-getCC):" \ - -e 's/-DCASEINSENSE//g' \ - makefile || die -} - -src_compile() { - emake dep - emake -} - -src_install() { - dobin unace - dodoc unix/readme.txt changes.log - doman ../debian/unace.1 -} diff --git a/app-arch/unace/unace-2.5-r1.ebuild b/app-arch/unace/unace-2.5-r1.ebuild deleted file mode 100644 index 3736683c62e9..000000000000 --- a/app-arch/unace/unace-2.5-r1.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/unace/unace-2.5-r1.ebuild,v 1.7 2010/01/01 19:40:07 fauli Exp $ - -inherit eutils toolchain-funcs - -DEB_VER="5" -DESCRIPTION="ACE unarchiver" -HOMEPAGE="http://www.winace.com/" -SRC_URI="mirror://debian/pool/non-free/u/unace-nonfree/unace-nonfree_${PV}.orig.tar.gz - mirror://debian/pool/non-free/u/unace-nonfree/unace-nonfree_${PV}-${DEB_VER}.diff.gz" - -LICENSE="freedist" -SLOT="1" -KEYWORDS="~alpha ~amd64 -hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~sparc-solaris" -IUSE="" - -DEPEND="" - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${WORKDIR}"/unace-nonfree_${PV}-${DEB_VER}.diff - local p - for p in $(<unace-nonfree-${PV}/debian/patches/00list) ; do - epatch unace-nonfree-${PV}/debian/patches/${p}.dpatch - done - tc-export CC -} - -src_install() { - dobin unace || die - doman unace-nonfree-${PV}/debian/manpage/unace.1 -} diff --git a/app-arch/unace/unace-2.5-r2.ebuild b/app-arch/unace/unace-2.5-r2.ebuild deleted file mode 100644 index dffebad852d5..000000000000 --- a/app-arch/unace/unace-2.5-r2.ebuild +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/unace/unace-2.5-r2.ebuild,v 1.10 2013/02/20 09:54:31 ago Exp $ - -inherit eutils toolchain-funcs - -DEB_VER="5" -DESCRIPTION="ACE unarchiver" -HOMEPAGE="http://www.winace.com/" -SRC_URI="mirror://debian/pool/non-free/u/unace-nonfree/unace-nonfree_${PV}.orig.tar.gz - mirror://debian/pool/non-free/u/unace-nonfree/unace-nonfree_${PV}-${DEB_VER}.diff.gz" - -LICENSE="freedist" -SLOT="1" -KEYWORDS="alpha amd64 ~arm hppa ppc ppc64 s390 x86 ~amd64-linux ~x86-linux ~sparc-solaris" -IUSE="" - -DEPEND="" - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${WORKDIR}"/unace-nonfree_${PV}-${DEB_VER}.diff - local p - for p in $(<unace-nonfree-${PV}/debian/patches/00list) ; do - epatch unace-nonfree-${PV}/debian/patches/${p}.dpatch - done - epatch "${FILESDIR}"/${P}-endianness-detection.patch - tc-export CC -} - -src_install() { - dobin unace || die - doman unace-nonfree-${PV}/debian/manpage/unace.1 -} diff --git a/app-arch/unace/unace-2.5.ebuild b/app-arch/unace/unace-2.5.ebuild deleted file mode 100644 index d3a862b8da90..000000000000 --- a/app-arch/unace/unace-2.5.ebuild +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-arch/unace/unace-2.5.ebuild,v 1.2 2007/02/01 13:58:51 beandog Exp $ - -DESCRIPTION="ACE unarchiver" -HOMEPAGE="http://www.winace.com/" -SRC_URI="http://www.winace.com/files/linunace${PV//.}.tgz" - -LICENSE="freedist" -SLOT="0" -KEYWORDS="-* ~amd64 ~x86" -IUSE="" -RESTRICT="strip" - -DEPEND="" - -S=${WORKDIR} - -src_install() { - into /opt - dobin unace || die -} |