Re: Environment handling broken in /bin/sh with changes to {get,set,put}env()

From: Andrey Chernov <ache_at_nagual.pp.ru>
Date: Wed, 4 Jul 2007 23:59:39 +0400
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/
Received on Wed Jul 04 2007 - 17:59:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:13 UTC