[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: env
From: |
Eric Blake |
Subject: |
Re: env |
Date: |
Tue, 20 Feb 2007 14:25:53 +0000 |
> As env exits immediately, I'm having difficulty seeing what problems
> you're encountering.
>
> > The difficulty occurs when a LD_PRELOAD shared object uses glib
> > functions that rely in the stability of environ.
>
> No function is called before exit(EXIT_SUCCESS).
Not true. I can see the OP's point - in an LD_PRELOAD setup,
it is possible to override puts() with a version that depends
on its environment; and by traversing with a local variable
instead of environ, you then control whether puts is affected
by the current traversal. Why you would want to use LD_PRELOAD
to do something that fragile is a different matter, but the code as
is definitely makes system calls with a changed environment,
whereas the proposed patch would avoid that.
--
Eric Blake
- env, Harvey Eneman, 2007/02/20
- Re: env, Philip Rowlands, 2007/02/20
- Re: env, Jim Meyering, 2007/02/20