You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.5 KiB

diff -u -r ../node-v10.9.0/src/node.cc ./src/node.cc
--- ../node-v10.9.0/src/node.cc 2018-08-15 13:53:34.000000000 +0000
+++ ./src/node.cc 2018-08-23 20:49:59.353995878 +0000
@@ -106,7 +106,7 @@
#include <unistd.h> // setuid, getuid
#endif
-#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
+#if defined(__POSIX__) && !defined(__CloudABI__)
#include <pwd.h> // getpwnam()
#include <grp.h> // getgrnam()
#endif
@@ -690,7 +690,7 @@
// Look up environment variable unless running as setuid root.
bool SafeGetenv(const char* key, std::string* text) {
-#if !defined(__CloudABI__) && !defined(_WIN32)
+#if !defined(__CloudABI__) && !defined(_WIN32) && !defined(__ANDROID__)
if (linux_at_secure || getuid() != geteuid() || getgid() != getegid())
goto fail;
#endif
@@ -2402,13 +2402,13 @@
env->SetMethod(process, "reallyExit", Exit);
env->SetMethodNoSideEffect(process, "uptime", Uptime);
-#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
+#if defined(__POSIX__) && !defined(__CloudABI__)
env->SetMethodNoSideEffect(process, "getuid", GetUid);
env->SetMethodNoSideEffect(process, "geteuid", GetEUid);
env->SetMethodNoSideEffect(process, "getgid", GetGid);
env->SetMethodNoSideEffect(process, "getegid", GetEGid);
env->SetMethodNoSideEffect(process, "getgroups", GetGroups);
-#endif // __POSIX__ && !defined(__ANDROID__) && !defined(__CloudABI__)
+#endif // __POSIX__ && !defined(__CloudABI__)
}