From owner-freebsd-bugs@FreeBSD.ORG Fri May 7 16:30:06 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EEE931065674 for ; Fri, 7 May 2010 16:30:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id B3B7C8FC16 for ; Fri, 7 May 2010 16:30:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o47GU6TC044474 for ; Fri, 7 May 2010 16:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o47GU6UE044469; Fri, 7 May 2010 16:30:06 GMT (envelope-from gnats) Resent-Date: Fri, 7 May 2010 16:30:06 GMT Resent-Message-Id: <201005071630.o47GU6UE044469@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Peer Stritzinger Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 185B51065673 for ; Fri, 7 May 2010 16:27:52 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 0822D8FC1A for ; Fri, 7 May 2010 16:27:52 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o47GRpbw011797 for ; Fri, 7 May 2010 16:27:51 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o47GRpO1011796; Fri, 7 May 2010 16:27:51 GMT (envelope-from nobody) Message-Id: <201005071627.o47GRpO1011796@www.freebsd.org> Date: Fri, 7 May 2010 16:27:51 GMT From: Peer Stritzinger To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/146378: sh(1) can't path expand foo/*"/baz" patterns X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2010 16:30:07 -0000 >Number: 146378 >Category: bin >Synopsis: sh(1) can't path expand foo/*"/baz" patterns >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri May 07 16:30:06 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Peer Stritzinger >Release: FreeBSD 8.0-RELEASE i386 >Organization: Dipl.Phys. Peer Stritzinger GmbH >Environment: FreeBSD xxx.xxx.xxx 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: sh(1) does not path expand correctly if the combination *"/ appears in the path. Paths like foo/*/"baz" work and also path like fo*"bar". Also "foo/"*/baz works. But not paths like foo/*"/baz" This occurs e.g. in the configure scripts of the latest rtems embedded operating system, this was seen "in the wild": for bsp_cfgs in `ls "$srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU/"*"/make/custom/$1.cfg" 2>/dev/null`; do When the port in the ports collection is updated this problem might arise. I tested this also under other BSDis systems especially an older version of FreeBSD: FreeBSD 6.1-RELEASE-p3 i386 -> works OpenBSD 4.2 i386 -> works >How-To-Repeat: in an empty directory: Preparation: $ mkdir -p foo/bar/baz Test using /bin/sh: $ echo foo/*"/baz" foo/*/baz -> correct would be the output foo/bar/baz >Fix: >Release-Note: >Audit-Trail: >Unformatted: