Bash Wipes Out DYLD_LIBRARY_PATH on El Capitan

Originator:justatheory
Number:rdar://22807197 Date Originated:2014-09-22
Status:Closed Resolved:Duplicate
Product:OS X Product Version:10.11 Beta (15A278b)
Classification: Reproducible:Always
 
Summary:
I use zsh, but need to use bash scripts. Some of them need to use `LD_LIBRARY_PATH` and/or `DYLD_LIBRARY_PATH`. However, they are not passed through to bash. This emits nothing:

    DYLD_LIBRARY_PATH=test bash -c 'echo $DYLD_LIBRARY_PATH'

 I have no custom `~/.bash*` files.

Steps to Reproduce:
1. Start a terminal session with an account that uses zsh for its shell.
2. Make sure there are no `~/.bash` files
3. Run `DYLD_LIBRARY_PATH=test bash -c 'echo $DYLD_LIBRARY_PATH'`

Expected Results:
Should emit "test"

Actual Results:
Emits a blank line.

Version:
10.11 Beta (15A278b)

Notes:
Interestingly, the same happens when calling zsh:

    DYLD_LIBRARY_PATH=test zsh -c 'echo $DYLD_LIBRARY_PATH' 

It looks like something in the system is mucking with this variable so it doesn't get passed through. Related to call to `setuid()` or `setgid()` as described in rdar://11894054?

Comments

Matthias Goetzke

Well the issue 21732670 is not visible / does not exist. so where is this tracked ?

Apple Developer Relations 30-Sep-2015 10:35 AM

Engineering has determined that your bug report (22807197) is a duplicate of another issue (21732670) and will be closed.

The open or closed status of the original bug report your issue was duplicated to appears in the yellow "Duplicate of XXXXXXXX" section of the bug reporter user interface. This section appears near the top of the right column's bug detail view just under the bug number, title, state, product and rank.

An example of the duplicate section from the bug reporter user interface with your bug and the duplicate bug info is included below:

22807197 Bash Wipes Out DYLD_LIBRARY_PATH on El Capitan

By justatheory at Oct. 1, 2015, 10:16 p.m. (reply...)

David Wheeler 22-Sep-2015 01:54 PM

Output on Yosemite:

$ DYLD_LIBRARY_PATH=test bash -c 'echo $DYLD_LIBRARY_PATH'
test
$ DYLD_LIBRARY_PATH=test zsh -c 'echo $DYLD_LIBRARY_PATH'
test

So, is this due to the new "rootless" feature of El Capitan?

By justatheory at Sept. 22, 2015, 8:54 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!