Re: Adding the secure_getenv call to FreeBSD's libc

From: Brooks Davis <brooks_at_freebsd.org>
Date: Fri, 10 Mar 2023 21:39:22 UTC
On Fri, Mar 10, 2023 at 04:27:05PM -0500, Lucy Marsh wrote:
> Dear FreeBSD Hackers,
> 
> I was wondering if adding the glibc extension call, `secure_getenv`, to 
> FreeBSD's libc is allowed. Obviously, this would not only need to be 
> permitted but also wanted. In that latter department, I could see the 
> need arise for `secure_getenv` when porting applications written for 
> Linux as they are often written targeting glibc. Also, this addition 
> would bring us more inline with other libc implementations such as musl 
> libc.

Looking at the musl implementation, it looks like this is part of a set
of environment (mostly path) hardening changes in libc.  On the whole
they seem like reasonable things to do if we haven't already done them
on an adhoc basis.

-- Brooks