setenv() doesn't export unsetenv()ed variables to environ

Sean C. Farley scf at FreeBSD.org
Sat Sep 15 14:52:07 PDT 2007


On Mon, 10 Sep 2007, YAMAMOTO, Taku wrote:

> Greetings,
>
> I found a regression in src/lib/libc/stdlib/getenv.c during tracking
> strange behaviour of the sshguard-pf.
>
> In short, setenv() doesn't add an entry to environ[] if the name was
> once removed by unsetenv().
>
> I'm suspecting the function __setenv() lacks care of the case to reuse
> a deactivated entry and it needs the following change:

I just committed the patch.  Thank you.

Sean
-- 
scf at FreeBSD.org


More information about the freebsd-current mailing list