[lkml]   [1996]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: As 2.0 looms
Marek Michalkiewicz wrote:
> Alain KNAFF:
> > >You decide
> > >which one you want to use at link time (default is to ignore LD_xxx -
> > >it's not necessary except for testing new shared libraries). I think
> >
> > LD_xxx is also needed for programs such as zlibc, which work by
> > redefining certain library calls. Ignoring LD_xxx by default would
> > make any such program impractical.
> OK, thanks for pointing this out. But you can still make the binaries
> use LD_xxx if you want.
> There should be a secure LD_PRELOAD equivalent - use a system-wide config
> file instead of environment variables. I think David Engel is working on
> it (specifying libraries to preload in /etc/ Is it OK
> for zlibc, or does every user really have to be able to redefine library
> calls on their own? (/etc/ would be useful for other things
> as well, like replacing crypt() with something better.)
> Marek

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 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 seems to handle it in a safe way: only allow it if the
programmer could have relinked the program himself and done it

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.


 \ /
  Last update: 2005-03-22 13:37    [W:0.087 / U:6.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site