diff options
author | Petr Vaněk <arkamar@atlas.cz> | 2019-05-28 22:47:48 +0200 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2019-08-08 11:33:18 -0400 |
commit | 7844ecb590893f8344324837956718001402d297 (patch) | |
tree | 0f35921dfe7c6e305e989be075ce228e1e540b15 /src/env/secure_getenv.c | |
parent | 0847902ab99065a48f9bd3729b6e676288dfd69e (diff) | |
download | musl-7844ecb590893f8344324837956718001402d297.tar.gz musl-7844ecb590893f8344324837956718001402d297.tar.bz2 musl-7844ecb590893f8344324837956718001402d297.tar.xz musl-7844ecb590893f8344324837956718001402d297.zip |
add secure_getenv function
This function is a GNU extension introduced in glibc 2.17.
Diffstat (limited to 'src/env/secure_getenv.c')
-rw-r--r-- | src/env/secure_getenv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/env/secure_getenv.c b/src/env/secure_getenv.c new file mode 100644 index 00000000..72322f81 --- /dev/null +++ b/src/env/secure_getenv.c @@ -0,0 +1,8 @@ +#define _GNU_SOURCE +#include <stdlib.h> +#include "libc.h" + +char *secure_getenv(const char *name) +{ + return libc.secure ? NULL : getenv(name); +} |