NetBSD Problem Report #36954

From martin@duskware.de  Sun Sep  9 09:13:26 2007
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 4863063B8A2
	for <gnats-bugs@gnats.netbsd.org>; Sun,  9 Sep 2007 09:13:26 +0000 (UTC)
Message-Id: <20070909080037.149CA63B8A2@narn.NetBSD.org>
Date: Sun,  9 Sep 2007 08:00:37 +0000 (UTC)
From: rillig@NetBSD.org
Reply-To: rillig@NetBSD.org
To: netbsd-bugs-owner@NetBSD.org
Subject: /bin/sh doesn't expand ${line%%/\**} correctly
X-Send-Pr-Version: www-1.0

>Number:         36954
>Category:       bin
>Synopsis:       /bin/sh doesn't expand ${line%%/\**} correctly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 09 09:15:04 +0000 2007
>Closed-Date:    Sat Dec 20 20:37:11 +0000 2008
>Last-Modified:  Sun Dec 21 08:50:02 +0000 2008
>Originator:     Roland Illig
>Release:        4.99.30
>Organization:
>Environment:
>Description:
The expression ${line%%/\**} should return the leading part of $line, cutting off the first occurrence of /* and everything that follows it.

Currently, the \* is not handled as specifying a * character, but is essentially equal to giving a plain * character.
>How-To-Repeat:
sh $NETBSDSRC/regress/bin/sh/expand.sh

>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: christos@NetBSD.org
State-Changed-When: Sat, 20 Dec 2008 15:37:11 -0500
State-Changed-Why:
fixed, thanks


From: Christos Zoulas <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/36954 CVS commit: src/bin/sh
Date: Sat, 20 Dec 2008 20:36:44 +0000 (UTC)

 Module Name:	src
 Committed By:	christos
 Date:		Sat Dec 20 20:36:44 UTC 2008

 Modified Files:
 	src/bin/sh: expand.c

 Log Message:
 PR/36954: Roland Illig: don't eat backlash escapes in variable patterns.
 Makes ${line%%\**} work.


 To generate a diff of this commit:
 cvs rdiff -r1.79 -r1.80 src/bin/sh/expand.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Markus W Kilbinger <mk@kilbi.de>
To: christos@netbsd.org, gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org,
    rillig@NetBSD.org
Subject: Re: PR/36954 CVS commit: src/bin/sh
Date: Sun, 21 Dec 2008 09:47:46 +0100

 >>>>> "Christos" == Christos Zoulas <christos@netbsd.org> writes:

     Christos>  Modified Files:
     Christos>  	src/bin/sh: expand.c

     Christos>  Log Message: PR/36954: Roland Illig: don't eat backlash
     Christos>  escapes in variable patterns. Makes ${line%%\**} work.


     Christos>  To generate a diff of this commit: cvs rdiff -r1.79
     Christos>  -r1.80 src/bin/sh/expand.c

 This change seems to break many /etc/rc* (and indirectly) *.mk stuff
 of a regular NetBSD system. I noticed that first during
 /etc/rc.d/network start, when some ifconfig.XXX were no longer set up.

 Also /usr/sbin/postinstall check now produces some 'additional'
 output.

 Just reverting this change seems to fix it.

 Markus.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.