bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hidden directories breaks path expansions


From: werner
Subject: Hidden directories breaks path expansions
Date: Mon, 4 Mar 2019 14:19:58 +0100

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -fmessage-length=0 -grecord-gcc-switches -O2 -Wall 
-D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables 
-fasynchronous-unwind-tables -fstack-clash-protection -g  -D_GNU_SOURCE 
-DRECYCLES_PIDS -Wall -g -Wuninitialized -Wextra -Wno-switch-enum 
-Wno-unused-variable -Wno-unused-parameter -Wno-parentheses -ftree-loop-linear 
-pipe -DBNC382214=0 -DIMPORT_FUNCTIONS_DEF=0 -Wno-parentheses 
-Wno-format-security
uname output: Linux boole 4.12.14-lp150.12.48-default #1 SMP Tue Feb 12 
14:01:48 UTC 2019 (268f014) x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-suse-linux-gnu

Bash Version: 5.0
Patch Level: 2
Release Status: release

Description:
        Since patch bash50-001 there is a regession on path expansion.
        The script example below shows:

        bash/bash> bash tmp/bug.sh
        5.0.2(1)-release
        drwxr-xr-x 2 nobody root 17 Mar  4 14:08 .

        bash/bash> /dist/unpacked/sle15-x86_64.full/bin/bash tmp/bug.sh
        4.4.23(1)-release
        -rw-r--r-- 1 nobody root 0 Mar  4 14:10 
/tmp/bugthroughpatch001/hidden/foo/bar

        Disabling patch bash50-001 solves this problem but cause
        other problems. It seems as seen by strace and ltrace that
        the bash with patch bash50-001 now makes a stat(2) on every
        single part of the path and run onto EACCES error which cause
        the regression above.

Repeat-By:
        <script>
        #!/bin/bash -x

        sudo mkdir -p        /tmp/bugthroughpatch001/hidden/foo
        sudo touch           /tmp/bugthroughpatch001/hidden/foo/bar
        sudo chown nobody -R /tmp/bugthroughpatch001
        sudo chmod 711       /tmp/bugthroughpatch001/hidden

        shopt -s nullglob

        SRCDIR=/tmp/bugthroughpatch001/hidden/foo

        cd "$SRCDIR"
        MYSRCDIR="$SRCDIR"

        echo $BASH_VERSION
        ls -ld "$MYSRCDIR"/*
        <script/>
Fix:
        No working fix known (onyl disabling patch bash50-001)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]