summaryrefslogtreecommitdiff
path: root/libc/stdlib/secure_getenv.c
diff options
context:
space:
mode:
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);
+}
+