From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S3dqD-0004GU-3N for garchives@archives.gentoo.org; Sat, 03 Mar 2012 01:32:57 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 575E4E06DC; Sat, 3 Mar 2012 01:32:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id ECA02E06DC for ; Sat, 3 Mar 2012 01:32:48 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3BB311B4033 for ; Sat, 3 Mar 2012 01:32:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 042B2E542A for ; Sat, 3 Mar 2012 01:32:47 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1330738358.91879751dc938038f9a0677f62d738c64c306cc8.blueness@gentoo> Subject: [gentoo-commits] proj/hardened-dev:uclibc commit in: sys-apps/util-linux/, sys-apps/util-linux/files/ X-VCS-Repository: proj/hardened-dev X-VCS-Files: sys-apps/util-linux/files/util-linux-2.20.1-scanf-as.patch sys-apps/util-linux/files/util-linux-2.20.1-sscanf-no-ms-as.patch sys-apps/util-linux/util-linux-2.20.1-r99.ebuild X-VCS-Directories: sys-apps/util-linux/ sys-apps/util-linux/files/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 91879751dc938038f9a0677f62d738c64c306cc8 X-VCS-Branch: uclibc Date: Sat, 3 Mar 2012 01:32:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: a34318c5-f3a8-4baf-916a-2b011ba47670 X-Archives-Hash: d5a6ac2bff0b6aff833883024d2a85c1 commit: 91879751dc938038f9a0677f62d738c64c306cc8 Author: Anthony G. Basile gentoo org> AuthorDate: Sat Mar 3 01:32:38 2012 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sat Mar 3 01:32:38 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/hardened-dev.= git;a=3Dcommit;h=3D91879751 sys-apps/util-linux: replace my hacky patch with upstream fix --- .../files/util-linux-2.20.1-scanf-as.patch | 12 --- .../files/util-linux-2.20.1-sscanf-no-ms-as.patch | 80 ++++++++++++++= ++++++ sys-apps/util-linux/util-linux-2.20.1-r99.ebuild | 2 +- 3 files changed, 81 insertions(+), 13 deletions(-) diff --git a/sys-apps/util-linux/files/util-linux-2.20.1-scanf-as.patch b= /sys-apps/util-linux/files/util-linux-2.20.1-scanf-as.patch deleted file mode 100644 index 32f20bf..0000000 --- a/sys-apps/util-linux/files/util-linux-2.20.1-scanf-as.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur util-linux-2.20.1.orig//include/c.h util-linux-2.20.1/include= /c.h ---- util-linux-2.20.1.orig//include/c.h 2011-10-18 08:22:27.000000000 -0= 400 -+++ util-linux-2.20.1/include/c.h 2012-02-16 15:23:55.000000000 -0500 -@@ -216,7 +216,7 @@ - */ - #ifdef HAVE_SCANF_MS_MODIFIER - #define UL_SCNsA "%ms" --#elif defined(HAVE_SCANF_AS_MODIFIER) -+#else - #define UL_SCNsA "%as" - #endif -=20 diff --git a/sys-apps/util-linux/files/util-linux-2.20.1-sscanf-no-ms-as.= patch b/sys-apps/util-linux/files/util-linux-2.20.1-sscanf-no-ms-as.patch new file mode 100644 index 0000000..ea0743e --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.20.1-sscanf-no-ms-as.patch @@ -0,0 +1,80 @@ +See https://bugs.gentoo.org/show_bug.cgi?id=3D406303 +diff -Naur util-linux-2.20.1.orig/libmount/src/tab_parse.c util-linux-2.= 20.1/libmount/src/tab_parse.c +--- util-linux-2.20.1.orig/libmount/src/tab_parse.c 2011-12-12 20:51:06.= 646614964 -0500 ++++ util-linux-2.20.1/libmount/src/tab_parse.c 2011-12-12 21:02:03.58786= 5010 -0500 +@@ -51,19 +51,21 @@ + */ + static int mnt_parse_table_line(struct libmnt_fs *fs, char *s) + { +- int rc, n =3D 0; +- char *src, *fstype, *optstr; +- +- rc =3D sscanf(s, UL_SCNsA" " /* (1) source */ +- UL_SCNsA" " /* (2) target */ +- UL_SCNsA" " /* (3) FS type */ +- UL_SCNsA" " /* (4) options */ ++ int rc, n =3D 0, len =3D strlen (s) + 1; ++ char *src =3D malloc (sizeof *src * len); ++ char *fstype =3D malloc (sizeof *fstype * len); ++ char *optstr =3D malloc (sizeof *optstr * len); ++ ++ rc =3D sscanf(s, "%s"" " /* (1) source */ ++ "%s"" " /* (2) target */ ++ "%s"" " /* (3) FS type */ ++ "%s"" " /* (4) options */ + "%n", /* byte count */ +=20 +- &src, +- &fs->target, +- &fstype, +- &optstr, ++ src, ++ fs->target, ++ fstype, ++ optstr, + &n); +=20 + if (rc =3D=3D 4) { +@@ -108,16 +110,20 @@ + */ + static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s) + { +- int rc, end =3D 0; ++ int rc, end =3D 0, len =3D strlen (s) + 1; + unsigned int maj, min; + char *fstype, *src, *p; +=20 ++ fs->root =3D malloc (sizeof *fs->root * len); ++ fs->target =3D malloc (sizeof *fs->target * len); ++ fs->vfs_optstr =3D malloc (sizeof *fs->vfs_optstr * len); ++ + rc =3D sscanf(s, "%u " /* (1) id */ + "%u " /* (2) parent */ + "%u:%u " /* (3) maj:min */ +- UL_SCNsA" " /* (4) mountroot */ +- UL_SCNsA" " /* (5) target */ +- UL_SCNsA /* (6) vfs options (fs-independent) */ ++ "%s"" " /* (4) mountroot */ ++ "%s"" " /* (5) target */ ++ "%s" /* (6) vfs options (fs-independent) */ + "%n", /* number of read bytes */ +=20 + &fs->id, +@@ -139,9 +145,14 @@ + } + s =3D p + 3; +=20 +- rc +=3D sscanf(s, UL_SCNsA" " /* (8) FS type */ +- UL_SCNsA" " /* (9) source */ +- UL_SCNsA, /* (10) fs options (fs specific) */ ++ len =3D strlen (s) + 1; ++ fstype =3D malloc (sizeof *fstype * len); ++ src =3D malloc (sizeof *src * len); ++ fs->fs_optstr =3D malloc (sizeof *fs->fs_optstr * len); ++ ++ rc +=3D sscanf(s, "%s"" " /* (8) FS type */ ++ "%s"" " /* (9) source */ ++ "%s", /* (10) fs options (fs specific) */ +=20 + &fstype, + &src, diff --git a/sys-apps/util-linux/util-linux-2.20.1-r99.ebuild b/sys-apps/= util-linux/util-linux-2.20.1-r99.ebuild index a831577..522875c 100644 --- a/sys-apps/util-linux/util-linux-2.20.1-r99.ebuild +++ b/sys-apps/util-linux/util-linux-2.20.1-r99.ebuild @@ -34,7 +34,7 @@ DEPEND=3D"${RDEPEND} virtual/os-headers" =20 src_prepare() { - epatch "${FILESDIR}"/${P}-scanf-as.patch + epatch "${FILESDIR}"/${P}-sscanf-no-ms-as.patch use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dir= ent.h/g mount/lomount.c elibtoolize }