dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
Lawrence Velázquez
larryv at macports.org
Fri May 17 13:42:06 PDT 2013
On May 17, 2013, at 3:39 PM, Rodolfo Aramayo <raramayo at gmail.com> wrote:
> You say
> "dyld removes those variables from its environment "
Yes. You'll note that the message you posted starts with "dyld".
> what is dyld? A program?
dyld is the dynamic loader. It's responsible for locating and loading dynamic libraries into memory when a process needs them.
Ordinarily, dyld's behavior is affected by LD_LIBRARY_PATH and a plethora of DYLD_* variables (see the dyld(1) man page for a list). This would pose a security risk if the process in question were running with the privileges of its owner (often root) rather than those of the user who executed it (which is what setuid/setgid means).
> and why when "export LD_LIBRARY_PATH=/usr/local/bioinfosoft/genometools/lib"
> is sourced from a file located outside the 'admin' directory is a problem
> whereas if it is sourced from one of the .bash* files is not?
I don't know where you're getting this impression.
It does not matter where the "export" statement is. It could be in .bashrc, .bash_profile, .profile, or some random script in /usr/local/lib/bin/foo/bar/baz/whatever; you could have run it manually at the prompt. As long as DYLD_* or LD_LIBRARY_PATH is in your environment, dyld will throw a warning when running setuid/setgid executables.
vq
More information about the macports-users
mailing list