DYLD_ env vars ignored warning shown without DYLD_PRINT_WARNINGS

Number:rdar://11894054 Date Originated:7/17/2012
Status:closed Resolved:
Product:Mac OS X Product Version:12A269
Classification:Serious Bug Reproducible:Always
A change introduced in OS X 10.8 causes a warning to be emitted on the console every time a setuid or setgid program is run when a DYLD_ environment variable has been set. There appears to be no way to disable this warning, even though the behavior (ignoring DYLD_ variables) was not introduced in 10.8.

Steps to Reproduce:
2. Run any setuid or setgid program. For example, 'ps'.

Expected Results:
The normal output of 'ps' (or whatever was run), without extra stuff output to stderr.

Actual Results:
dyld: DYLD_ environment variables being ignored because main executable (/bin/ps) is setuid or setgid
(normal 'ps' output)


This is a problem for two reasons. First, DYLD_PRINT_WARNINGS already exists and it seems reasonable that if this variable is not also set, the user is not concerned that running a setuid/setgid program will prune DYLD_ variables. This behavior is not new; http://www.opensource.apple.com/source/dyld/dyld-132.13/src/dyld.cpp shows that it exists prior to 10.8 (that source file prunes but does not emit a warning about it).

The second is that the MySQL 5.5 binaries distributed by Oracle have been broken for over 1.5 years and ship with client libraries that are missing an absolute path. The result is that runtime linking with these libraries fails. The simplest solution is to add /usr/local/mysql/lib to DYLD_LIBRARY_PATH (for more information, see http://lightyearsoftware.com/2011/02/mysql-5-5-on-mac-os-x/). However, on 10.8 this new warning is spewing on to our consoles. For example, Phusion Passenger (a popular web server used in Ruby development) runs something every 5 seconds that triggers this warning.


Also having this issue

It's a real annoyance, but doesn't seem to "break" anything.

10.8.2 Supplemental

I think the 10.8.2 Supplemental Update 1.0 has addressed this?

10.8.2 Supplemental did not fix for me

I just installed the supplemental and am still seeding this warning.

By chad.norwood at Oct. 15, 2012, 2:45 p.m. (reply...)

Having significant trouble too

Background: I am attempting to run Oracle's SQLPlus from the Mac. The instructions say to create the following environment variable: DYLD_LIBRARY_PATH ~/bin/instantclient I have done this in my /etc/launchd.conf with the following: setenv DYLD_LIBRARY_PATH ~/bin/instantclient

I have also made sure that launchd.conf is properly invoked (in other words that I didn't screw something else up!) by placing the following line in there as well


As expected there is an environment variable CHRIS with value BIRD when I issue set at a $ prompt. However there is no DYLD_LIBRARY_PATH variable set.

During startup I get the message dytd: DYLD_ Environment variables being ignored because main executable (/usr/bin/login)is setuid or setgid.

So of course the Oracle sqlplus environment won't work.

Any ideas/thoughts/help greatly appreciated.



Fixed in Mavericks

This is still an issue in OS X 10.8.4, but I confirmed with Apple that it is fixed in the first Mavericks developer seed.

By steve.madsen at June 13, 2013, 1:53 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!