On 4/27/24 6:23 PM, Gioele Barabucci wrote:
Package: bash
Version: 5.2.21-2
X-Debbugs-CC: [email protected]

Hi,

bash 5.0 and 5.2 do not set $BASH to the right value when bash is used as the login shell:

     $ apt install bash-static
     $ getent passwd $USER | cut -d: -f 7
     /bin/bash

    $ su $USER -s /bin/bash-static -c 'echo $BASH; readlink /proc/$$/exe; true'
     /usr/bin/bash-static
     /usr/bin/bash-static

    $ su -l $USER -s /bin/bash-static -c 'echo $BASH; readlink /proc/$$/exe; true'
     /bin/bash
     /usr/bin/bash-static

(bash-static is not a link to bash)

What does `su' pass to bash in argv[0]?

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to