Environment handling broken in /bin/sh with changes to
{get,set,put}env()
Sean C. Farley
scf at FreeBSD.org
Thu Jul 5 02:53:33 UTC 2007
On Thu, 5 Jul 2007, Andrey Chernov wrote:
> On Wed, Jul 04, 2007 at 11:59:39PM +0400, Andrey Chernov wrote:
>>> Sean
>>> 1. http://www.farley.org/freebsd/tmp/setenv/clearenv/
>
> BTW, I think this one should _not_ free() anything according to your
> comment:
>
> No
> * previous variables are ever freed here to avoid causing a segmentation fault
> * in a user's code.
The latest patch at the same URL fixes that issue. It basically
deactivates all existing variables and inserts the new environ variables
into the envVars array.
Sean
--
scf at FreeBSD.org
More information about the freebsd-current
mailing list