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 1S3e2r-00064i-Rl for garchives@archives.gentoo.org; Sat, 03 Mar 2012 01:46:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 754BFE075C; Sat, 3 Mar 2012 01:45:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 312E8E075C for ; Sat, 3 Mar 2012 01:45:53 +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 481391B4032 for ; Sat, 3 Mar 2012 01:45:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id DEC80E542A for ; Sat, 3 Mar 2012 01:45:50 +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: <1330739111.3a964f5b33f453b37a022bc91c835aba00ece876.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: 3a964f5b33f453b37a022bc91c835aba00ece876 X-VCS-Branch: uclibc Date: Sat, 3 Mar 2012 01:45:50 +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: 5d00ae04-3971-4a88-8fa8-4a4aed12bbdf X-Archives-Hash: 69da63f08428bf67db2487c9a8106563 commit: 3a964f5b33f453b37a022bc91c835aba00ece876 Author: Anthony G. Basile gentoo org> AuthorDate: Sat Mar 3 01:45:11 2012 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sat Mar 3 01:45:11 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/hardened-dev.= git;a=3Dcommit;h=3D3a964f5b Revert "sys-apps/util-linux: replace my hacky patch with upstream fix" My hacky patch is actually better! This reverts commit 91879751dc938038f9a0677f62d738c64c306cc8. --- .../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, 13 insertions(+), 81 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 new file mode 100644 index 0000000..32f20bf --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.20.1-scanf-as.patch @@ -0,0 +1,12 @@ +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 deleted file mode 100644 index ea0743e..0000000 --- a/sys-apps/util-linux/files/util-linux-2.20.1-sscanf-no-ms-as.patch +++ /dev/null @@ -1,80 +0,0 @@ -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 522875c..a831577 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}-sscanf-no-ms-as.patch + epatch "${FILESDIR}"/${P}-scanf-as.patch use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dir= ent.h/g mount/lomount.c elibtoolize }