DYLD_ env vars ignored warning shown without DYLD_PRINT_WARNINGS
|Product:||Mac OS X
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:
1. Set DYLD_LIBRARY_PATH=/foo
2. Run any setuid or setgid program. For example, 'ps'.
The normal output of 'ps' (or whatever was run), without extra stuff output to stderr.
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.
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!