mirror of https://github.com/nodejs/node.git
doc: use test username instead of real
PR-URL: https://github.com/nodejs/node/pull/35611 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Harshitha K P <harshitha014@gmail.com>pull/35611/head
parent
999e7d7b44
commit
92610f330d
|
@ -1457,7 +1457,7 @@ Use care when dropping privileges:
|
|||
|
||||
```js
|
||||
console.log(process.getgroups()); // [ 0 ]
|
||||
process.initgroups('bnoordhuis', 1000); // switch user
|
||||
process.initgroups('nodeuser', 1000); // switch user
|
||||
console.log(process.getgroups()); // [ 27, 30, 46, 1000, 0 ]
|
||||
process.setgid(1000); // drop root gid
|
||||
console.log(process.getgroups()); // [ 27, 30, 46, 1000 ]
|
||||
|
|
Loading…
Reference in New Issue