MCPcopy Index your code
hub / github.com/nodejs/node / initgroups

Function initgroups

lib/internal/bootstrap/switches/does_own_process_state.js:56–66  ·  view source on GitHub ↗
(user, extraGroup)

Source from the content-addressed store, hash-verified

54 } = credentials;
55
56 function initgroups(user, extraGroup) {
57 validateId(user, 'user');
58 validateId(extraGroup, 'extraGroup');
59 // Result is 0 on success, 1 if user is unknown, 2 if group is unknown.
60 const result = _initgroups(user, extraGroup);
61 if (result === 1) {
62 throw new ERR_UNKNOWN_CREDENTIAL('User', user);
63 } else if (result === 2) {
64 throw new ERR_UNKNOWN_CREDENTIAL('Group', extraGroup);
65 }
66 }
67
68 function setgroups(groups) {
69 validateArray(groups, 'groups');

Callers

nothing calls this directly

Calls 1

validateIdFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…