<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/stdlib/getenv.3, branch release/14.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F14.4.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F14.4.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2024-11-21T00:45:07Z</updated>
<entry>
<title>libc: indicate existing functions that are POSIX 2024</title>
<updated>2024-11-21T00:45:07Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2024-11-14T19:30:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=098ed26bf4564362c4478b8c92b11ab9ca074da1'/>
<id>urn:sha1:098ed26bf4564362c4478b8c92b11ab9ca074da1</id>
<content type='text'>
Reviewed by:	brooks, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47581

(cherry picked from commit dfa0ac74c2fbc1cde3e8cdb1ab9fe5cbb90a9b16)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line nroff pattern</title>
<updated>2023-08-16T17:55:15Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b2c76c41be32f904179efed29c0ca04d53f3996c'/>
<id>urn:sha1:b2c76c41be32f904179efed29c0ca04d53f3996c</id>
<content type='text'>
Remove /^\.\\"\s*\$FreeBSD\$$\n/
</content>
</entry>
<entry>
<title>secure_getenv: Improve documentation wording</title>
<updated>2023-03-25T17:06:13Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-03-14T17:02:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d5df268584209c448d2e3f344b8b15c944e48b82'/>
<id>urn:sha1:d5df268584209c448d2e3f344b8b15c944e48b82</id>
<content type='text'>
Improve the documentation wording to be more consistent with FreeBSD
manual pages.

Suggested by:		mjg (though reworded)
Sponsored by:		Netflix
</content>
</entry>
<entry>
<title>Add GNU glibc compatible secure_getenv</title>
<updated>2023-03-14T04:19:24Z</updated>
<author>
<name>lucy</name>
<email>seafork@disroot.org</email>
</author>
<published>2023-03-13T22:01:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=adeca21464d25bc61f98968a5c1e76ab3c808ae4'/>
<id>urn:sha1:adeca21464d25bc61f98968a5c1e76ab3c808ae4</id>
<content type='text'>
Add mostly glibc and msl compatible secure_getenv. Return NULL if
issetugid() indicates the process is tainted, otherwise getenv(x).  The
rational behind this is the fact that many Linux applications use this
function instead of getenv() as it's widely consider a, "best
practice".

Reviewed by: imp, mjg (feedback)
Pull Request: https://github.com/freebsd/freebsd-src/pull/686
Signed-off-by: Lucy Marsh &lt;seafork@disroot.org&gt;
</content>
</entry>
<entry>
<title>libc: add clearenv function</title>
<updated>2021-11-07T15:20:15Z</updated>
<author>
<name>Mariusz Zaborski</name>
<email>oshogbo@FreeBSD.org</email>
</author>
<published>2021-11-07T15:15:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=597b02675751e48dd04777f1e91fee382bf3a966'/>
<id>urn:sha1:597b02675751e48dd04777f1e91fee382bf3a966</id>
<content type='text'>
The clearenv(3) function allows us to clear all environment
variable in one shot. This may be useful for security programs that
want to control the environment or what variables are passed to new
spawned programs.

Reviewed by:	scf, markj (secteam), 0mp (manpages)
Differential Revision:	https://reviews.freebsd.org/D28223
</content>
</entry>
<entry>
<title>Renumber clauses to reduce diffs to other versions</title>
<updated>2013-05-28T20:57:40Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2013-05-28T20:57:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3fb3b97c4d38990da5f45b37e48a5110b3e9bc58'/>
<id>urn:sha1:3fb3b97c4d38990da5f45b37e48a5110b3e9bc58</id>
<content type='text'>
NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3,
so follow suit to make comparison easier.
</content>
</entry>
<entry>
<title>General mdoc(7) and typo fixes.</title>
<updated>2012-05-11T20:06:46Z</updated>
<author>
<name>Glen Barber</name>
<email>gjb@FreeBSD.org</email>
</author>
<published>2012-05-11T20:06:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a3fb6da9ba05cbeeab1d5bec46075916256d2fb0'/>
<id>urn:sha1:a3fb6da9ba05cbeeab1d5bec46075916256d2fb0</id>
<content type='text'>
PR:		167734
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
</content>
</entry>
<entry>
<title>Remove trailing whitespace per mdoc lint warning</title>
<updated>2012-03-29T05:02:12Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2012-03-29T05:02:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=50d675f7a9fca2f3fba3a23ac41a8ae2c0162e4e'/>
<id>urn:sha1:50d675f7a9fca2f3fba3a23ac41a8ae2c0162e4e</id>
<content type='text'>
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
</content>
</entry>
<entry>
<title>Update the getenv(3) man page to reflect the recent change to the behavior</title>
<updated>2009-12-06T23:51:27Z</updated>
<author>
<name>Sean Farley</name>
<email>scf@FreeBSD.org</email>
</author>
<published>2009-12-06T23:51:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ef6ccfb52a591425d94eb1dd7aebb4b069f2c983'/>
<id>urn:sha1:ef6ccfb52a591425d94eb1dd7aebb4b069f2c983</id>
<content type='text'>
of setenv(), putenv() and unsetenv() when dealing with corrupt entries in
environ.  They now output a warning and complete their task without error.

MFC after:	1 week
</content>
</entry>
<entry>
<title>Significantly reduce the memory leak as noted in BUGS section for</title>
<updated>2007-07-04T00:00:41Z</updated>
<author>
<name>Sean Farley</name>
<email>scf@FreeBSD.org</email>
</author>
<published>2007-07-04T00:00:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2966d28c322dcfa4b9db2558da0b91839e7798b9'/>
<id>urn:sha1:2966d28c322dcfa4b9db2558da0b91839e7798b9</id>
<content type='text'>
setenv(3) by tracking the size of the memory allocated instead of using
strlen() on the current value.

Convert all calls to POSIX from historic BSD API:
 - unsetenv returns an int.
 - putenv takes a char * instead of const char *.
 - putenv no longer makes a copy of the input string.
 - errno is set appropriately for POSIX.  Exceptions involve bad environ
   variable and internal initialization code.  These both set errno to
   EFAULT.

Several patches to base utilities to handle the POSIX changes from
Andrey Chernov's previous commit.  A few I re-wrote to use setenv()
instead of putenv().

New regression module for tools/regression/environ to test these
functions.  It also can be used to test the performance.

Bump __FreeBSD_version to 700050 due to API change.

PR:		kern/99826
Approved by:	wes
Approved by:	re (kensmith)
</content>
</entry>
</feed>
