]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libc: add clearenv function
authorMariusz Zaborski <oshogbo@FreeBSD.org>
Sun, 7 Nov 2021 15:15:28 +0000 (16:15 +0100)
committerMariusz Zaborski <oshogbo@FreeBSD.org>
Sun, 7 Nov 2021 15:20:15 +0000 (16:20 +0100)
commit597b02675751e48dd04777f1e91fee382bf3a966
tree2dc6bd312cfe5c1fcf869c9668664747a9768648
parente9c7c6f5a021a02c5af2fa446d31cf3756b58d62
libc: add clearenv function

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
include/stdlib.h
lib/libc/stdlib/Makefile.inc
lib/libc/stdlib/Symbol.map
lib/libc/stdlib/getenv.3
lib/libc/stdlib/getenv.c
lib/libc/tests/stdlib/Makefile
lib/libc/tests/stdlib/clearenv_test.c [new file with mode: 0644]