mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-14 22:32:30 +01:00
rtld: provide private getenv(3)
Reviewed by: arichardson, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31545
This commit is contained in:
parent
bfd4c875a1
commit
b4b2748891
@ -27,7 +27,7 @@ SRCS+= rtld_libc.c
|
||||
|
||||
# Now build the remaining files from libc:
|
||||
.PATH: ${LIBC_SRCTOP}/stdlib
|
||||
SRCS+= reallocf.c realpath.c getenv.c merge.c reallocarray.c
|
||||
SRCS+= reallocf.c realpath.c merge.c reallocarray.c
|
||||
# TODO: fix merge.c to build with WARNS=6
|
||||
.if ${COMPILER_TYPE} == "clang"
|
||||
CFLAGS.merge.c+=-Wno-error=null-pointer-arithmetic
|
||||
|
@ -6027,6 +6027,12 @@ rtld_strerror(int errnum)
|
||||
return (sys_errlist[errnum]);
|
||||
}
|
||||
|
||||
char *
|
||||
getenv(const char *name)
|
||||
{
|
||||
return (rtld_get_env_val(environ, name, strlen(name)));
|
||||
}
|
||||
|
||||
/* malloc */
|
||||
void *
|
||||
malloc(size_t nbytes)
|
||||
|
Loading…
Reference in New Issue
Block a user