Commit 3dc54041 authored by Divyanshu Singh's avatar Divyanshu Singh Committed by Anna Henningsen
Browse files

test: resolve process.setegid error on Ubuntu

When the tests are run as root in Ubuntu, process.setegid is called with
'nobody' as an argument. This throws an error in Ubuntu. This is because
in Ubuntu the equivalent of 'nobody' group is named as 'nogroup'.

This commit sets egid to 'nobody' first and if it throws a `group id
does not exist` error, it attempts to set egid to 'nogroup'. If it still
causes an error, the error is thrown.

PR-URL: https://github.com/nodejs/node/pull/19757
Refs: https://github.com/nodejs/node/issues/19594


Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarDaniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: default avatarGireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent f8b3774d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment