There are a lot of things we don't have to have, but which are
still convenient. The average end user probably has little use
for LD_PRELOAD, but programmers do.
Personally, I like being able to use LD_PRELOAD to load malloc() and
friends replacements that have better error checking (I'm thinking
of libdmalloc by gray.watson@letters.com). Granted I don't use it
a *lot*, but it is really nice when I do.
Overall, as scary as the LD_PRELOAD thing was at first, Linux's
ld.so seems to handle it in a safe way: only allow it if the
programmer could have relinked the program himself and done it
anyway.
The telnet security hole should just be a reminder that environment
variables are just like command line arguments, and it is dangerous
to allow aribitrary users to give arbitrary arguments to a
program executed by root.
Finally, using a system-wide config file would largely ruin the
main point of LD_PRELOAD as I understand it; I thought the point
was to invoke a program with different libraries than it would
get by default?
My vote is to leave the LD_xxx system as it is, and keep an eye
out for:
a) places the system really lets users gain a privilage
they wouldn't have before.
b) places where unprivilaged users can specify an arbitrary
environment variable for a program that root will execute.
lex