1 |
|
|
#include "env-inl.h" |
2 |
|
|
#include "node_external_reference.h" |
3 |
|
|
#include "node_internals.h" |
4 |
|
|
#include "util-inl.h" |
5 |
|
|
|
6 |
|
|
#ifdef NODE_IMPLEMENTS_POSIX_CREDENTIALS |
7 |
|
|
#include <grp.h> // getgrnam() |
8 |
|
|
#include <pwd.h> // getpwnam() |
9 |
|
|
#endif // NODE_IMPLEMENTS_POSIX_CREDENTIALS |
10 |
|
|
|
11 |
|
|
#if !defined(_MSC_VER) |
12 |
|
|
#include <unistd.h> // setuid, getuid |
13 |
|
|
#endif |
14 |
|
|
#ifdef __linux__ |
15 |
|
|
#include <linux/capability.h> |
16 |
|
|
#include <sys/syscall.h> |
17 |
|
|
#endif // __linux__ |
18 |
|
|
|
19 |
|
|
namespace node { |
20 |
|
|
|
21 |
|
|
using v8::Array; |
22 |
|
|
using v8::Context; |
23 |
|
|
using v8::FunctionCallbackInfo; |
24 |
|
|
using v8::HandleScope; |
25 |
|
|
using v8::Isolate; |
26 |
|
|
using v8::Local; |
27 |
|
|
using v8::MaybeLocal; |
28 |
|
|
using v8::Object; |
29 |
|
|
using v8::String; |
30 |
|
|
using v8::TryCatch; |
31 |
|
|
using v8::Uint32; |
32 |
|
|
using v8::Value; |
33 |
|
|
|
34 |
|
|
namespace per_process { |
35 |
|
|
bool linux_at_secure = false; |
36 |
|
|
} // namespace per_process |
37 |
|
|
|
38 |
|
|
namespace credentials { |
39 |
|
|
|
40 |
|
|
#if defined(__linux__) |
41 |
|
|
// Returns true if the current process only has the passed-in capability. |
42 |
|
|
bool HasOnly(int capability) { |
43 |
|
|
DCHECK(cap_valid(capability)); |
44 |
|
|
|
45 |
|
|
struct __user_cap_data_struct cap_data[2]; |
46 |
|
|
struct __user_cap_header_struct cap_header_data = { |
47 |
|
|
_LINUX_CAPABILITY_VERSION_3, |
48 |
|
|
getpid()}; |
49 |
|
|
|
50 |
|
|
|
51 |
|
|
if (syscall(SYS_capget, &cap_header_data, &cap_data) != 0) { |
52 |
|
|
return false; |
53 |
|
|
} |
54 |
|
|
if (capability < 32) { |
55 |
|
|
return cap_data[0].permitted == |
56 |
|
|
static_cast<unsigned int>(CAP_TO_MASK(capability)); |
57 |
|
|
} |
58 |
|
|
return cap_data[1].permitted == |
59 |
|
|
static_cast<unsigned int>(CAP_TO_MASK(capability)); |
60 |
|
|
} |
61 |
|
|
#endif |
62 |
|
|
|
63 |
|
|
// Look up the environment variable and allow the lookup if the current |
64 |
|
|
// process only has the capability CAP_NET_BIND_SERVICE set. If the current |
65 |
|
|
// process does not have any capabilities set and the process is running as |
66 |
|
|
// setuid root then lookup will not be allowed. |
67 |
|
|
bool SafeGetenv(const char* key, std::string* text, Environment* env) { |
68 |
|
|
#if !defined(__CloudABI__) && !defined(_WIN32) |
69 |
|
|
#if defined(__linux__) |
70 |
|
|
if ((!HasOnly(CAP_NET_BIND_SERVICE) && per_process::linux_at_secure) || |
71 |
|
|
getuid() != geteuid() || getgid() != getegid()) |
72 |
|
|
#else |
73 |
|
|
if (per_process::linux_at_secure || getuid() != geteuid() || |
74 |
|
|
getgid() != getegid()) |
75 |
|
|
#endif |
76 |
|
|
goto fail; |
77 |
|
|
#endif |
78 |
|
|
|
79 |
|
|
if (env != nullptr) { |
80 |
|
|
HandleScope handle_scope(env->isolate()); |
81 |
|
|
TryCatch ignore_errors(env->isolate()); |
82 |
|
|
MaybeLocal<String> maybe_value = env->env_vars()->Get( |
83 |
|
|
env->isolate(), |
84 |
|
|
String::NewFromUtf8(env->isolate(), key).ToLocalChecked()); |
85 |
|
|
Local<String> value; |
86 |
|
|
if (!maybe_value.ToLocal(&value)) goto fail; |
87 |
|
|
String::Utf8Value utf8_value(env->isolate(), value); |
88 |
|
|
if (*utf8_value == nullptr) goto fail; |
89 |
|
|
*text = std::string(*utf8_value, utf8_value.length()); |
90 |
|
|
return true; |
91 |
|
|
} |
92 |
|
|
|
93 |
|
|
{ |
94 |
|
|
Mutex::ScopedLock lock(per_process::env_var_mutex); |
95 |
|
|
|
96 |
|
|
size_t init_sz = 256; |
97 |
|
|
MaybeStackBuffer<char, 256> val; |
98 |
|
|
int ret = uv_os_getenv(key, *val, &init_sz); |
99 |
|
|
|
100 |
|
|
if (ret == UV_ENOBUFS) { |
101 |
|
|
// Buffer is not large enough, reallocate to the updated init_sz |
102 |
|
|
// and fetch env value again. |
103 |
|
|
val.AllocateSufficientStorage(init_sz); |
104 |
|
|
ret = uv_os_getenv(key, *val, &init_sz); |
105 |
|
|
} |
106 |
|
|
|
107 |
|
|
if (ret >= 0) { // Env key value fetch success. |
108 |
|
|
*text = *val; |
109 |
|
|
return true; |
110 |
|
|
} |
111 |
|
|
} |
112 |
|
|
|
113 |
|
|
fail: |
114 |
|
|
text->clear(); |
115 |
|
|
return false; |
116 |
|
|
} |
117 |
|
|
|
118 |
|
|
static void SafeGetenv(const FunctionCallbackInfo<Value>& args) { |
119 |
|
|
CHECK(args[0]->IsString()); |
120 |
|
|
Environment* env = Environment::GetCurrent(args); |
121 |
|
|
Isolate* isolate = env->isolate(); |
122 |
|
|
Utf8Value strenvtag(isolate, args[0]); |
123 |
|
|
std::string text; |
124 |
|
|
if (!SafeGetenv(*strenvtag, &text, env)) return; |
125 |
|
|
Local<Value> result = |
126 |
|
|
ToV8Value(isolate->GetCurrentContext(), text).ToLocalChecked(); |
127 |
|
|
args.GetReturnValue().Set(result); |
128 |
|
|
} |
129 |
|
|
|
130 |
|
|
#ifdef NODE_IMPLEMENTS_POSIX_CREDENTIALS |
131 |
|
|
|
132 |
|
|
static const uid_t uid_not_found = static_cast<uid_t>(-1); |
133 |
|
|
static const gid_t gid_not_found = static_cast<gid_t>(-1); |
134 |
|
|
|
135 |
|
|
static uid_t uid_by_name(const char* name) { |
136 |
|
|
struct passwd pwd; |
137 |
|
|
struct passwd* pp; |
138 |
|
|
char buf[8192]; |
139 |
|
|
|
140 |
|
|
errno = 0; |
141 |
|
|
pp = nullptr; |
142 |
|
|
|
143 |
|
|
if (getpwnam_r(name, &pwd, buf, sizeof(buf), &pp) == 0 && pp != nullptr) |
144 |
|
|
return pp->pw_uid; |
145 |
|
|
|
146 |
|
|
return uid_not_found; |
147 |
|
|
} |
148 |
|
|
|
149 |
|
|
static char* name_by_uid(uid_t uid) { |
150 |
|
|
struct passwd pwd; |
151 |
|
|
struct passwd* pp; |
152 |
|
|
char buf[8192]; |
153 |
|
|
int rc; |
154 |
|
|
|
155 |
|
|
errno = 0; |
156 |
|
|
pp = nullptr; |
157 |
|
|
|
158 |
|
|
if ((rc = getpwuid_r(uid, &pwd, buf, sizeof(buf), &pp)) == 0 && |
159 |
|
|
pp != nullptr) { |
160 |
|
|
return strdup(pp->pw_name); |
161 |
|
|
} |
162 |
|
|
|
163 |
|
|
if (rc == 0) errno = ENOENT; |
164 |
|
|
|
165 |
|
|
return nullptr; |
166 |
|
|
} |
167 |
|
|
|
168 |
|
|
static gid_t gid_by_name(const char* name) { |
169 |
|
|
struct group pwd; |
170 |
|
|
struct group* pp; |
171 |
|
|
char buf[8192]; |
172 |
|
|
|
173 |
|
|
errno = 0; |
174 |
|
|
pp = nullptr; |
175 |
|
|
|
176 |
|
|
if (getgrnam_r(name, &pwd, buf, sizeof(buf), &pp) == 0 && pp != nullptr) |
177 |
|
|
return pp->gr_gid; |
178 |
|
|
|
179 |
|
|
return gid_not_found; |
180 |
|
|
} |
181 |
|
|
|
182 |
|
|
#if 0 // For future use. |
183 |
|
|
static const char* name_by_gid(gid_t gid) { |
184 |
|
|
struct group pwd; |
185 |
|
|
struct group* pp; |
186 |
|
|
char buf[8192]; |
187 |
|
|
int rc; |
188 |
|
|
|
189 |
|
|
errno = 0; |
190 |
|
|
pp = nullptr; |
191 |
|
|
|
192 |
|
|
if ((rc = getgrgid_r(gid, &pwd, buf, sizeof(buf), &pp)) == 0 && |
193 |
|
|
pp != nullptr) { |
194 |
|
|
return strdup(pp->gr_name); |
195 |
|
|
} |
196 |
|
|
|
197 |
|
|
if (rc == 0) |
198 |
|
|
errno = ENOENT; |
199 |
|
|
|
200 |
|
|
return nullptr; |
201 |
|
|
} |
202 |
|
|
#endif |
203 |
|
|
|
204 |
|
|
static uid_t uid_by_name(Isolate* isolate, Local<Value> value) { |
205 |
|
|
if (value->IsUint32()) { |
206 |
|
|
return static_cast<uid_t>(value.As<Uint32>()->Value()); |
207 |
|
|
} else { |
208 |
|
|
Utf8Value name(isolate, value); |
209 |
|
|
return uid_by_name(*name); |
210 |
|
|
} |
211 |
|
|
} |
212 |
|
|
|
213 |
|
|
static gid_t gid_by_name(Isolate* isolate, Local<Value> value) { |
214 |
|
|
if (value->IsUint32()) { |
215 |
|
|
return static_cast<gid_t>(value.As<Uint32>()->Value()); |
216 |
|
|
} else { |
217 |
|
|
Utf8Value name(isolate, value); |
218 |
|
|
return gid_by_name(*name); |
219 |
|
|
} |
220 |
|
|
} |
221 |
|
|
|
222 |
|
|
static void GetUid(const FunctionCallbackInfo<Value>& args) { |
223 |
|
|
Environment* env = Environment::GetCurrent(args); |
224 |
|
|
CHECK(env->has_run_bootstrapping_code()); |
225 |
|
|
// uid_t is an uint32_t on all supported platforms. |
226 |
|
|
args.GetReturnValue().Set(static_cast<uint32_t>(getuid())); |
227 |
|
|
} |
228 |
|
|
|
229 |
|
|
static void GetGid(const FunctionCallbackInfo<Value>& args) { |
230 |
|
|
Environment* env = Environment::GetCurrent(args); |
231 |
|
|
CHECK(env->has_run_bootstrapping_code()); |
232 |
|
|
// gid_t is an uint32_t on all supported platforms. |
233 |
|
|
args.GetReturnValue().Set(static_cast<uint32_t>(getgid())); |
234 |
|
|
} |
235 |
|
|
|
236 |
|
|
static void GetEUid(const FunctionCallbackInfo<Value>& args) { |
237 |
|
|
Environment* env = Environment::GetCurrent(args); |
238 |
|
|
CHECK(env->has_run_bootstrapping_code()); |
239 |
|
|
// uid_t is an uint32_t on all supported platforms. |
240 |
|
|
args.GetReturnValue().Set(static_cast<uint32_t>(geteuid())); |
241 |
|
|
} |
242 |
|
|
|
243 |
|
|
static void GetEGid(const FunctionCallbackInfo<Value>& args) { |
244 |
|
|
Environment* env = Environment::GetCurrent(args); |
245 |
|
|
CHECK(env->has_run_bootstrapping_code()); |
246 |
|
|
// gid_t is an uint32_t on all supported platforms. |
247 |
|
|
args.GetReturnValue().Set(static_cast<uint32_t>(getegid())); |
248 |
|
|
} |
249 |
|
|
|
250 |
|
|
static void SetGid(const FunctionCallbackInfo<Value>& args) { |
251 |
|
|
Environment* env = Environment::GetCurrent(args); |
252 |
|
|
CHECK(env->owns_process_state()); |
253 |
|
|
|
254 |
|
|
CHECK_EQ(args.Length(), 1); |
255 |
|
|
CHECK(args[0]->IsUint32() || args[0]->IsString()); |
256 |
|
|
|
257 |
|
|
gid_t gid = gid_by_name(env->isolate(), args[0]); |
258 |
|
|
|
259 |
|
|
if (gid == gid_not_found) { |
260 |
|
|
// Tells JS to throw ERR_INVALID_CREDENTIAL |
261 |
|
|
args.GetReturnValue().Set(1); |
262 |
|
|
} else if (setgid(gid)) { |
263 |
|
|
env->ThrowErrnoException(errno, "setgid"); |
264 |
|
|
} else { |
265 |
|
|
args.GetReturnValue().Set(0); |
266 |
|
|
} |
267 |
|
|
} |
268 |
|
|
|
269 |
|
|
static void SetEGid(const FunctionCallbackInfo<Value>& args) { |
270 |
|
|
Environment* env = Environment::GetCurrent(args); |
271 |
|
|
CHECK(env->owns_process_state()); |
272 |
|
|
|
273 |
|
|
CHECK_EQ(args.Length(), 1); |
274 |
|
|
CHECK(args[0]->IsUint32() || args[0]->IsString()); |
275 |
|
|
|
276 |
|
|
gid_t gid = gid_by_name(env->isolate(), args[0]); |
277 |
|
|
|
278 |
|
|
if (gid == gid_not_found) { |
279 |
|
|
// Tells JS to throw ERR_INVALID_CREDENTIAL |
280 |
|
|
args.GetReturnValue().Set(1); |
281 |
|
|
} else if (setegid(gid)) { |
282 |
|
|
env->ThrowErrnoException(errno, "setegid"); |
283 |
|
|
} else { |
284 |
|
|
args.GetReturnValue().Set(0); |
285 |
|
|
} |
286 |
|
|
} |
287 |
|
|
|
288 |
|
|
static void SetUid(const FunctionCallbackInfo<Value>& args) { |
289 |
|
|
Environment* env = Environment::GetCurrent(args); |
290 |
|
|
CHECK(env->owns_process_state()); |
291 |
|
|
|
292 |
|
|
CHECK_EQ(args.Length(), 1); |
293 |
|
|
CHECK(args[0]->IsUint32() || args[0]->IsString()); |
294 |
|
|
|
295 |
|
|
uid_t uid = uid_by_name(env->isolate(), args[0]); |
296 |
|
|
|
297 |
|
|
if (uid == uid_not_found) { |
298 |
|
|
// Tells JS to throw ERR_INVALID_CREDENTIAL |
299 |
|
|
args.GetReturnValue().Set(1); |
300 |
|
|
} else if (setuid(uid)) { |
301 |
|
|
env->ThrowErrnoException(errno, "setuid"); |
302 |
|
|
} else { |
303 |
|
|
args.GetReturnValue().Set(0); |
304 |
|
|
} |
305 |
|
|
} |
306 |
|
|
|
307 |
|
|
static void SetEUid(const FunctionCallbackInfo<Value>& args) { |
308 |
|
|
Environment* env = Environment::GetCurrent(args); |
309 |
|
|
CHECK(env->owns_process_state()); |
310 |
|
|
|
311 |
|
|
CHECK_EQ(args.Length(), 1); |
312 |
|
|
CHECK(args[0]->IsUint32() || args[0]->IsString()); |
313 |
|
|
|
314 |
|
|
uid_t uid = uid_by_name(env->isolate(), args[0]); |
315 |
|
|
|
316 |
|
|
if (uid == uid_not_found) { |
317 |
|
|
// Tells JS to throw ERR_INVALID_CREDENTIAL |
318 |
|
|
args.GetReturnValue().Set(1); |
319 |
|
|
} else if (seteuid(uid)) { |
320 |
|
|
env->ThrowErrnoException(errno, "seteuid"); |
321 |
|
|
} else { |
322 |
|
|
args.GetReturnValue().Set(0); |
323 |
|
|
} |
324 |
|
|
} |
325 |
|
|
|
326 |
|
|
static void GetGroups(const FunctionCallbackInfo<Value>& args) { |
327 |
|
|
Environment* env = Environment::GetCurrent(args); |
328 |
|
|
CHECK(env->has_run_bootstrapping_code()); |
329 |
|
|
|
330 |
|
|
int ngroups = getgroups(0, nullptr); |
331 |
|
|
if (ngroups == -1) return env->ThrowErrnoException(errno, "getgroups"); |
332 |
|
|
|
333 |
|
|
std::vector<gid_t> groups(ngroups); |
334 |
|
|
|
335 |
|
|
ngroups = getgroups(ngroups, groups.data()); |
336 |
|
|
if (ngroups == -1) |
337 |
|
|
return env->ThrowErrnoException(errno, "getgroups"); |
338 |
|
|
|
339 |
|
|
groups.resize(ngroups); |
340 |
|
|
gid_t egid = getegid(); |
341 |
|
|
if (std::find(groups.begin(), groups.end(), egid) == groups.end()) |
342 |
|
|
groups.push_back(egid); |
343 |
|
|
MaybeLocal<Value> array = ToV8Value(env->context(), groups); |
344 |
|
|
if (!array.IsEmpty()) |
345 |
|
|
args.GetReturnValue().Set(array.ToLocalChecked()); |
346 |
|
|
} |
347 |
|
|
|
348 |
|
|
static void SetGroups(const FunctionCallbackInfo<Value>& args) { |
349 |
|
|
Environment* env = Environment::GetCurrent(args); |
350 |
|
|
|
351 |
|
|
CHECK_EQ(args.Length(), 1); |
352 |
|
|
CHECK(args[0]->IsArray()); |
353 |
|
|
|
354 |
|
|
Local<Array> groups_list = args[0].As<Array>(); |
355 |
|
|
size_t size = groups_list->Length(); |
356 |
|
|
MaybeStackBuffer<gid_t, 64> groups(size); |
357 |
|
|
|
358 |
|
|
for (size_t i = 0; i < size; i++) { |
359 |
|
|
gid_t gid = gid_by_name( |
360 |
|
|
env->isolate(), groups_list->Get(env->context(), i).ToLocalChecked()); |
361 |
|
|
|
362 |
|
|
if (gid == gid_not_found) { |
363 |
|
|
// Tells JS to throw ERR_INVALID_CREDENTIAL |
364 |
|
|
args.GetReturnValue().Set(static_cast<uint32_t>(i + 1)); |
365 |
|
|
return; |
366 |
|
|
} |
367 |
|
|
|
368 |
|
|
groups[i] = gid; |
369 |
|
|
} |
370 |
|
|
|
371 |
|
|
int rc = setgroups(size, *groups); |
372 |
|
|
|
373 |
|
|
if (rc == -1) return env->ThrowErrnoException(errno, "setgroups"); |
374 |
|
|
|
375 |
|
|
args.GetReturnValue().Set(0); |
376 |
|
|
} |
377 |
|
|
|
378 |
|
|
static void InitGroups(const FunctionCallbackInfo<Value>& args) { |
379 |
|
|
Environment* env = Environment::GetCurrent(args); |
380 |
|
|
|
381 |
|
|
CHECK_EQ(args.Length(), 2); |
382 |
|
|
CHECK(args[0]->IsUint32() || args[0]->IsString()); |
383 |
|
|
CHECK(args[1]->IsUint32() || args[1]->IsString()); |
384 |
|
|
|
385 |
|
|
Utf8Value arg0(env->isolate(), args[0]); |
386 |
|
|
gid_t extra_group; |
387 |
|
|
bool must_free; |
388 |
|
|
char* user; |
389 |
|
|
|
390 |
|
|
if (args[0]->IsUint32()) { |
391 |
|
|
user = name_by_uid(args[0].As<Uint32>()->Value()); |
392 |
|
|
must_free = true; |
393 |
|
|
} else { |
394 |
|
|
user = *arg0; |
395 |
|
|
must_free = false; |
396 |
|
|
} |
397 |
|
|
|
398 |
|
|
if (user == nullptr) { |
399 |
|
|
// Tells JS to throw ERR_INVALID_CREDENTIAL |
400 |
|
|
return args.GetReturnValue().Set(1); |
401 |
|
|
} |
402 |
|
|
|
403 |
|
|
extra_group = gid_by_name(env->isolate(), args[1]); |
404 |
|
|
|
405 |
|
|
if (extra_group == gid_not_found) { |
406 |
|
|
if (must_free) free(user); |
407 |
|
|
// Tells JS to throw ERR_INVALID_CREDENTIAL |
408 |
|
|
return args.GetReturnValue().Set(2); |
409 |
|
|
} |
410 |
|
|
|
411 |
|
|
int rc = initgroups(user, extra_group); |
412 |
|
|
|
413 |
|
|
if (must_free) free(user); |
414 |
|
|
|
415 |
|
|
if (rc) return env->ThrowErrnoException(errno, "initgroups"); |
416 |
|
|
|
417 |
|
|
args.GetReturnValue().Set(0); |
418 |
|
|
} |
419 |
|
|
|
420 |
|
|
#endif // NODE_IMPLEMENTS_POSIX_CREDENTIALS |
421 |
|
|
|
422 |
|
|
void RegisterExternalReferences(ExternalReferenceRegistry* registry) { |
423 |
|
|
registry->Register(SafeGetenv); |
424 |
|
|
|
425 |
|
|
#ifdef NODE_IMPLEMENTS_POSIX_CREDENTIALS |
426 |
|
|
registry->Register(GetUid); |
427 |
|
|
registry->Register(GetEUid); |
428 |
|
|
registry->Register(GetGid); |
429 |
|
|
registry->Register(GetEGid); |
430 |
|
|
registry->Register(GetGroups); |
431 |
|
|
|
432 |
|
|
registry->Register(InitGroups); |
433 |
|
|
registry->Register(SetEGid); |
434 |
|
|
registry->Register(SetEUid); |
435 |
|
|
registry->Register(SetGid); |
436 |
|
|
registry->Register(SetUid); |
437 |
|
|
registry->Register(SetGroups); |
438 |
|
|
#endif // NODE_IMPLEMENTS_POSIX_CREDENTIALS |
439 |
|
|
} |
440 |
|
|
|
441 |
|
|
static void Initialize(Local<Object> target, |
442 |
|
|
Local<Value> unused, |
443 |
|
|
Local<Context> context, |
444 |
|
|
void* priv) { |
445 |
|
|
Environment* env = Environment::GetCurrent(context); |
446 |
|
|
Isolate* isolate = env->isolate(); |
447 |
|
|
|
448 |
|
|
env->SetMethod(target, "safeGetenv", SafeGetenv); |
449 |
|
|
|
450 |
|
|
#ifdef NODE_IMPLEMENTS_POSIX_CREDENTIALS |
451 |
|
|
READONLY_TRUE_PROPERTY(target, "implementsPosixCredentials"); |
452 |
|
|
env->SetMethodNoSideEffect(target, "getuid", GetUid); |
453 |
|
|
env->SetMethodNoSideEffect(target, "geteuid", GetEUid); |
454 |
|
|
env->SetMethodNoSideEffect(target, "getgid", GetGid); |
455 |
|
|
env->SetMethodNoSideEffect(target, "getegid", GetEGid); |
456 |
|
|
env->SetMethodNoSideEffect(target, "getgroups", GetGroups); |
457 |
|
|
|
458 |
|
|
if (env->owns_process_state()) { |
459 |
|
|
env->SetMethod(target, "initgroups", InitGroups); |
460 |
|
|
env->SetMethod(target, "setegid", SetEGid); |
461 |
|
|
env->SetMethod(target, "seteuid", SetEUid); |
462 |
|
|
env->SetMethod(target, "setgid", SetGid); |
463 |
|
|
env->SetMethod(target, "setuid", SetUid); |
464 |
|
|
env->SetMethod(target, "setgroups", SetGroups); |
465 |
|
|
} |
466 |
|
|
#endif // NODE_IMPLEMENTS_POSIX_CREDENTIALS |
467 |
|
|
} |
468 |
|
|
|
469 |
|
|
} // namespace credentials |
470 |
|
|
} // namespace node |
471 |
|
|
|
472 |
|
|
NODE_MODULE_CONTEXT_AWARE_INTERNAL(credentials, node::credentials::Initialize) |
473 |
|
|
NODE_MODULE_EXTERNAL_REFERENCE(credentials, |
474 |
|
|
node::credentials::RegisterExternalReferences) |