summaryrefslogtreecommitdiff
path: root/libc/stdlib/secure_getenv.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-12-27 09:24:07 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2017-01-14 18:31:49 +0100
commit50dd36a50ad76dee11edd67e69b5e0da11871fad (patch)
treeaf8f4703888682093d59d4705db028467017caac /libc/stdlib/secure_getenv.c
parentf21612d0097cde145c6a9a1b3127e99e83100448 (diff)
add secure_getenv() function
Diffstat (limited to 'libc/stdlib/secure_getenv.c')
-rw-r--r--libc/stdlib/secure_getenv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/stdlib/secure_getenv.c b/libc/stdlib/secure_getenv.c
new file mode 100644
index 000000000..41cb622c8
--- /dev/null
+++ b/libc/stdlib/secure_getenv.c
@@ -0,0 +1,8 @@
+
+#include <stdlib.h>
+
+char *secure_getenv(const char *name) {
+ if (issetugid()) return NULL;
+ return getenv(name);
+}
+