From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 46A591388BF for ; Fri, 19 Feb 2016 21:34:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CC66F21C067; Fri, 19 Feb 2016 21:34:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 73DDD21C067 for ; Fri, 19 Feb 2016 21:34:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3838F340E31 for ; Fri, 19 Feb 2016 21:34:06 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AD70715FA for ; Fri, 19 Feb 2016 21:34:04 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1455917153.beaa71df0ab2cfa61beba4be0303099aa6c75e6a.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: sh/ X-VCS-Repository: proj/openrc X-VCS-Files: sh/binfmt.sh.in X-VCS-Directories: sh/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: beaa71df0ab2cfa61beba4be0303099aa6c75e6a X-VCS-Branch: master Date: Fri, 19 Feb 2016 21:34:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 29adade1-5462-4ebb-85c9-821918b15d43 X-Archives-Hash: 785d41c54e9a200c6cb0ce25e12f5e1a commit: beaa71df0ab2cfa61beba4be0303099aa6c75e6a Author: Dustin C. Hatch hatch name> AuthorDate: Fri Feb 19 01:18:13 2016 +0000 Commit: William Hubbs gentoo org> CommitDate: Fri Feb 19 21:25:53 2016 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=beaa71df binfmt.sh: use read in raw mode The read builtin in most shells will interpret backslash characters as escapes, and they are lost when reading binfmt files line-by-line. This causes magic strings containing backslashes to be mangled and become invalid, resulting in erroneous 'invalid entry' messages. The -r option to read disables special handling of backslashes and keeps all lines intact. X-Gentoo-Bug: 575114 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=575114 sh/binfmt.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/binfmt.sh.in b/sh/binfmt.sh.in index fd422f8..be0ed48 100644 --- a/sh/binfmt.sh.in +++ b/sh/binfmt.sh.in @@ -22,7 +22,7 @@ apply_file() { ### FILE FORMAT ### # See https://www.kernel.org/doc/Documentation/binfmt_misc.txt - while read line; do + while read -r line; do LINENUM=$(( LINENUM+1 )) case $line in \#*) continue ;;