This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Eliminating LD_PRELOAD ERRORs with setuid programs
- From: Peter Åstrand <astrand at cendio dot se>
- To: libc-alpha at sourceware dot org
- Date: Mon, 24 Apr 2006 14:12:50 +0200 (CEST)
- Subject: Eliminating LD_PRELOAD ERRORs with setuid programs
We are using the LD_PRELOAD mechanism like this:
LD_PRELOAD=libfoo.so
LD_LIBRARY_PATH=/opt/ourproduct/lib64:/opt/ourproduct/lib
This works well for both 32 and 64 bit binaries, with one exception:
setuid programs, which gives:
ERROR: ld.so: object 'libfoo.so' from LD_PRELOAD cannot be preloaded: ignored.
How can we eliminate this error message? I've found out that it's actually
possible to use LD_PRELOAD with setuid programs if the library itself is
setuid and found in a standard directory.
However, we would prefer to have LD_PRELOAD (silently) ignored for setuid
programs. How can we achieve this?
Regards,
--
Peter Åstrand ThinLinc Chief Developer
Cendio http://www.cendio.se
Teknikringen 3
583 30 Linköping Phone: +46-13-21 46 00