This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]