Environment handling broken in /bin/sh with changes to
{get,set,put}env()
Andrey Chernov
ache at nagual.pp.ru
Wed Jul 4 19:59:43 UTC 2007
On Wed, Jul 04, 2007 at 02:47:50PM -0500, Sean C. Farley wrote:
> My only concern is with programs (i.e., su) that "clean" the environment
> after calling setenv(), putenv() or unsetenv(). I wrote a patch[1] (and
> test program) that checks for a change of the address that environ is
> pointing. If it detects a change, it scraps all that it knows about
> environ (frees everything) and starts with the new environ.
>
> Of course, the sh patch[2] is still needed.
>
> Sean
> 1. http://www.farley.org/freebsd/tmp/setenv/clearenv/
> 2. http://www.farley.org/freebsd/tmp/setenv/sh.patch
Ah, good catch. I think this two needs to be commited ASAP to avoid
more people reports.
--
http://ache.pp.ru/
More information about the freebsd-current
mailing list