summaryrefslogtreecommitdiff
path: root/src/node.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/node.cc')
-rw-r--r--src/node.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/node.cc b/src/node.cc
index 33bf5199d6..bfe36f218a 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -108,7 +108,7 @@ typedef int mode_t;
#include <unistd.h> // setuid, getuid
#endif
-#if defined(__POSIX__) && !defined(__ANDROID__)
+#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
#include <pwd.h> // getpwnam()
#include <grp.h> // getgrnam()
#endif
@@ -1002,7 +1002,7 @@ Local<Value> UVException(Isolate* isolate,
// Look up environment variable unless running as setuid root.
bool SafeGetenv(const char* key, std::string* text) {
-#ifndef _WIN32
+#if !defined(__CloudABI__) && !defined(_WIN32)
if (linux_at_secure || getuid() != geteuid() || getgid() != getegid())
goto fail;
#endif
@@ -2122,7 +2122,7 @@ static void Umask(const FunctionCallbackInfo<Value>& args) {
}
-#if defined(__POSIX__) && !defined(__ANDROID__)
+#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
static const uid_t uid_not_found = static_cast<uid_t>(-1);
static const gid_t gid_not_found = static_cast<gid_t>(-1);
@@ -2441,7 +2441,7 @@ static void InitGroups(const FunctionCallbackInfo<Value>& args) {
}
}
-#endif // __POSIX__ && !defined(__ANDROID__)
+#endif // __POSIX__ && !defined(__ANDROID__) && !defined(__CloudABI__)
static void WaitForInspectorDisconnect(Environment* env) {
@@ -3706,7 +3706,7 @@ void SetupProcessObject(Environment* env,
env->SetMethod(process, "umask", Umask);
-#if defined(__POSIX__) && !defined(__ANDROID__)
+#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
env->SetMethod(process, "getuid", GetUid);
env->SetMethod(process, "geteuid", GetEUid);
env->SetMethod(process, "setuid", SetUid);
@@ -3720,7 +3720,7 @@ void SetupProcessObject(Environment* env,
env->SetMethod(process, "getgroups", GetGroups);
env->SetMethod(process, "setgroups", SetGroups);
env->SetMethod(process, "initgroups", InitGroups);
-#endif // __POSIX__ && !defined(__ANDROID__)
+#endif // __POSIX__ && !defined(__ANDROID__) && !defined(__CloudABI__)
env->SetMethod(process, "_kill", Kill);