summaryrefslogtreecommitdiff
path: root/lib/os.js
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-12-16 03:13:12 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2018-12-19 02:44:03 +0800
commit321e296371383fd63131d21c1121e22163ddeb86 (patch)
tree71113f7b4f3300f706ee1a3f988bae117fc2c8c8 /lib/os.js
parent74a1dfb56e413373064475290a1fd6a9cf8cd9ae (diff)
downloadandroid-node-v8-321e296371383fd63131d21c1121e22163ddeb86.tar.gz
android-node-v8-321e296371383fd63131d21c1121e22163ddeb86.tar.bz2
android-node-v8-321e296371383fd63131d21c1121e22163ddeb86.zip
process: move POSIX credential accessors into node_credentials.cc
Expose the POSIX credential accessors through `internalBinding('credentials')` instead of setting them on the process or bootstrapper object from C++ directly. Also moves `SafeGetEnv` from `internalBinding('util')` to `internalBinding('credentials')` since it's closely related to the credentials. In the JS land, instead of wrapping the bindings then writing to the process object directly in main_thread_only.js, return the wrapped functions back to bootstrap/node.js where they get written to the process object conditionally for clarity. Refs: https://github.com/nodejs/node/issues/24961 PR-URL: https://github.com/nodejs/node/pull/25066 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/os.js')
-rw-r--r--lib/os.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/os.js b/lib/os.js
index 2c806908ee..28e1d7797f 100644
--- a/lib/os.js
+++ b/lib/os.js
@@ -21,7 +21,7 @@
'use strict';
-const { safeGetenv } = internalBinding('util');
+const { safeGetenv } = internalBinding('credentials');
const constants = internalBinding('constants').os;
const { deprecate } = require('internal/util');
const isWindows = process.platform === 'win32';