Bug#443685: bash: Quote removal happening too early

2024-03-22 Thread ton62j+drqwja2pu5a1w
Package: bash
Followup-For: Bug #443685

this isn't actually a bug in bash.

$ bash -o posix -c 'a=\\; echo $a\/*'
/bin /boot /cdrom /dev /emul /etc /export /home /initrd /lib /lib64 /lost+found 
/media /mnt /opt /proc /root /sbin /srv /sys /tmp /usr /var

is correct behavior.

bash 5.2.15 in debian behaves correctly.

Arguably it is a bug in dash instead.

Discussion here https://austingroupbugs.net/view.php?id=1234



Bug#443685: bash: Quote removal happening too early

2007-09-23 Thread herbert
Package: bash
Version: 2.05b-26
Severity: normal

$ bash -o posix -c 'a=\\; echo $a\/*'
/bin /boot /cdrom /dev /emul /etc /export /home /initrd /lib /lib64 /lost+found 
/media /mnt /opt /proc /root /sbin /srv /sys /tmp /usr /var
$

According to POSIX, pathname expansion shall occur prior to
quote removal.  So given that $a\/* has at least two backslashes
in it, it should produce at least a literal backslash in the
pattern for pathname expansion which is clearly not the case
looking at the result.

The only conclusion is that bash must have removed the quote
before the forward slash prior to pathname expansion which is
contrary to the POSIX specification.

-- System Information
Debian Release: 3.1
Kernel Version: Linux gondolin 2.6.17-rc4 #1 SMP PREEMPT Wed May 17 17:28:00 
EST 2006 i686 GNU/Linux

Versions of the packages bash depends on:
ii  base-files 3.1.2  Debian base system miscellaneous files
ii  libc6  2.3.2.ds1-22sa GNU C Library: Shared libraries and Timezone
ii  libncurses55.4-4  Shared libraries for terminal handling
ii  passwd 4.0.3-31sarge5 change and administer password and group dat



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]