Environment handling broken in /bin/sh with changes to
t,set,put}env()
Andrey Chernov
ache at nagual.pp.ru
Fri Jul 13 23:02:44 UTC 2007
On Sat, Jul 14, 2007 at 02:40:53AM +0400, Andrey Chernov wrote:
> > I chose #3. Try the patch[1] again. It creates a setenv() function
> > which is a wrapper around __setenv(). __setenv() takes the lengths of
> > name and value to allow the caller to calculate the length using pointer
> > arithmetic instead of strlen().
> >
> > Sean
> > 1. http://www.farley.org/freebsd/tmp/setenv/clearenv/patch
>
> The wrapper version finally looks OK for me.
BTW, since strlen(value) is common part, you may decrease one argument to
__setenv() call just passing value and doing strlen(value) inside it like
before, i.e.
valueLen = strlen(value);
--
http://ache.pp.ru/
More information about the freebsd-current
mailing list