Where does the filtering of environment variables occur? for instance, say you are using LD_PRELOAD for shared library interposition. However, when a setuid program is run, the LD_PRELOAD variable has no effect. It represents a case of what I am dubbing "environment variable filtering." I was wondering where the processing and ‘purging’ of environment variables takes place, specifically and/or precisely.
Where does the filtering of environment variables occur? for instance, say you are using
Share
The dynamic loader deals with
LD_PRELOADand related environment variables. It also determines whether a program is running SUID and ignores the environment variables.The actual name and location of the dynamic loader varies by system. For example, on RHEL 5 for x86/64, the library is
/lib/ld-linux.so.2for 32-bit software and/lib64/ld-linux-x86-64.so.2for 64-bit software; on Solaris 10 for SPARC, there’s/lib/ld.so.1for 32-bit code, and/lib/sparcv9/ld.so.1for 64-bit code.