opnsense-src/lib/libc/stdlib
lucy adeca21464 Add GNU glibc compatible secure_getenv
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 <seafork@disroot.org>
2023-03-13 22:19:24 -06:00
..
jemalloc Follow-up r365371 by removing sentences which indicate the state of the 2020-09-06 09:08:06 +00:00
_Exit.c
a64l.3
a64l.c
abort.3 Bump the date on man pages in r334306 2018-05-29 02:41:32 +00:00
abort.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
abs.3 libc: Add HISTORY sections to the manual pages 2022-05-05 18:46:32 +02:00
abs.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
alloca.3
at_quick_exit.3
atexit.3
atexit.c Fix order of destructors between main binary and libraries. 2019-04-15 13:03:09 +00:00
atexit.h General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
atof.3 Note some functions that appeared in First Edition Unix 2020-04-01 22:50:41 +00:00
atof.c libc: drop "All rights reserved" from Foundation copyrights 2022-08-04 16:57:50 -04:00
atoi.3 Note some functions that appeared in First Edition Unix 2020-04-01 22:50:41 +00:00
atoi.c libc: drop "All rights reserved" from Foundation copyrights 2022-08-04 16:57:50 -04:00
atol.3
atol.c libc: drop "All rights reserved" from Foundation copyrights 2022-08-04 16:57:50 -04:00
atoll.c libc: drop "All rights reserved" from Foundation copyrights 2022-08-04 16:57:50 -04:00
bsearch.3 bsearch.3: Improve the example. 2019-07-17 19:29:55 +00:00
bsearch.c libc: typo fix (s/involes/involves) 2020-10-16 17:51:09 +00:00
bsearch_b.c
cxa_thread_atexit.c Remove "All Rights Reserved" from FreeBSD Foundation libc copyrights 2022-07-21 09:53:31 -04:00
cxa_thread_atexit_impl.c Export __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit. 2017-01-07 16:05:19 +00:00
div.3
div.c libc: ANSIfy div / ldiv function definitions 2022-07-28 10:32:48 -04:00
exit.3 _Exit(3): document implementation 2021-08-08 22:39:46 +03:00
exit.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
getenv.3 Add GNU glibc compatible secure_getenv 2023-03-13 22:19:24 -06:00
getenv.c Add GNU glibc compatible secure_getenv 2023-03-13 22:19:24 -06:00
getopt.3
getopt.c getopt: Fix conversion from string-literal to non-const char * 2021-01-19 21:23:25 +00:00
getopt_long.3 getopt_long(3): note an inconsistency with getopt(3) in BUGS 2023-02-10 23:32:50 -06:00
getopt_long.c getopt: Fix conversion from string-literal to non-const char * 2021-01-19 21:23:25 +00:00
getsubopt.3
getsubopt.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
hcreate.3 hcreate(3): fix the ERRORS section and bump .Dd 2017-02-07 02:32:49 +00:00
hcreate.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
hcreate_r.c Replace implementation of hsearch() by one that scales. 2015-12-27 07:50:11 +00:00
hdestroy_r.c Replace implementation of hsearch() by one that scales. 2015-12-27 07:50:11 +00:00
heapsort.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
heapsort_b.c
hsearch.h Replace implementation of hsearch() by one that scales. 2015-12-27 07:50:11 +00:00
hsearch_r.c Replace implementation of hsearch() by one that scales. 2015-12-27 07:50:11 +00:00
imaxabs.3
imaxabs.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
imaxdiv.3
imaxdiv.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
insque.3
insque.c
l64a.c Let l64a() properly null terminate its result. 2016-05-26 20:55:15 +00:00
labs.3
labs.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
ldiv.3 libc: Add HISTORY sections to the manual pages 2022-05-05 18:46:32 +02:00
ldiv.c libc: ANSIfy div / ldiv function definitions 2022-07-28 10:32:48 -04:00
llabs.3
llabs.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
lldiv.3
lldiv.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
lsearch.3 Fix markup on "\n" in printf so it renders correctly. 2016-04-17 18:25:34 +00:00
lsearch.c
Makefile.inc Add GNU glibc compatible secure_getenv 2023-03-13 22:19:24 -06:00
memory.3
merge.c Fix null pointer subtraction in mergesort() 2021-08-27 19:46:18 +02:00
mergesort_b.c
ptsname.3 Implement ptsname_r. 2020-10-17 04:14:38 +00:00
ptsname.c Further refinements of ptsname_r(3) interface: 2020-10-20 01:29:45 +00:00
qsort.3 Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
qsort.c Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
qsort_r.c Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
qsort_r_compat.c Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
qsort_s.c Add qsort_s(3). Apart from the constraints, it also makes it easier 2020-01-20 11:40:07 +00:00
quick_exit.3 C++17 requires quick_exit(3) to be async-signal safe. 2017-11-04 10:52:58 +00:00
quick_exit.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
radixsort.3
radixsort.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
rand.3 rand(3): Replace implementation with one backed by random(3) algorithm 2020-02-01 20:33:23 +00:00
rand.c Fix race between first rand(3) calls with _once(). 2021-07-21 11:32:22 -04:00
random.3 rand(3): Replace implementation with one backed by random(3) algorithm 2020-02-01 20:33:23 +00:00
random.c rand(3): Replace implementation with one backed by random(3) algorithm 2020-02-01 20:33:23 +00:00
random.h rand(3): Replace implementation with one backed by random(3) algorithm 2020-02-01 20:33:23 +00:00
reallocarray.3
reallocarray.c
reallocf.3
reallocf.c Regularize my copyright notice 2019-12-04 16:56:11 +00:00
realpath.3
realpath.c vfs: add realpathat syscall 2020-02-20 16:58:19 +00:00
remque.c
set_constraint_handler_s.3 Provide set_constraint_handler_s(3) man page. 2018-08-19 14:39:57 +00:00
set_constraint_handler_s.c Improve standard compliance for memset_s() and abort_handler_s(). 2017-08-12 15:18:17 +00:00
strfmon.3 strfmon(3): Wording improvements 2023-01-25 11:02:55 +02:00
strfmon.c strfmon(3): Match the return type 2023-01-25 11:02:55 +02:00
strtod.3
strtoimax.c libc: drop "All rights reserved" from Foundation copyrights 2022-08-04 16:57:50 -04:00
strtol.3
strtol.c libc: drop "All rights reserved" from Foundation copyrights 2022-08-04 16:57:50 -04:00
strtold.c Remove "All Rights Reserved" from FreeBSD Foundation libc copyrights 2022-07-21 09:53:31 -04:00
strtoll.c libc: drop "All rights reserved" from Foundation copyrights 2022-08-04 16:57:50 -04:00
strtonum.3
strtonum.c
strtoq.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
strtoul.3
strtoul.c libc: drop "All rights reserved" from Foundation copyrights 2022-08-04 16:57:50 -04:00
strtoull.c libc: drop "All rights reserved" from Foundation copyrights 2022-08-04 16:57:50 -04:00
strtoumax.c libc: drop "All rights reserved" from Foundation copyrights 2022-08-04 16:57:50 -04:00
strtouq.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
Symbol.map Add GNU glibc compatible secure_getenv 2023-03-13 22:19:24 -06:00
system.3 libc: Fix most issues reported by mandoc 2020-12-19 14:54:28 +00:00
system.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
tdelete.c Improve typing of POSIX search tree functions. 2016-10-13 18:25:40 +00:00
tfind.c Improve typing of POSIX search tree functions. 2016-10-13 18:25:40 +00:00
tsearch.3 Follow up to r320992, properly escape the backslash so it renders properly. 2017-07-14 17:27:15 +00:00
tsearch.c Improve typing of POSIX search tree functions. 2016-10-13 18:25:40 +00:00
tsearch_path.h
twalk.c Improve typing of POSIX search tree functions. 2016-10-13 18:25:40 +00:00