termux-packages/packages/nodejs/deps-uv-src-unix-process.c....

31 lines
1.0 KiB
Diff
Raw Normal View History

--- ./deps/uv/src/unix/process.c 2021-06-03 07:15:30.000000000 +0530
+++ ./deps/uv/src/unix/process.c.mod 2021-06-18 20:15:54.095642543 +0530
@@ -281,27 +281,6 @@
_exit(127);
}
- if (options->flags & (UV_PROCESS_SETUID | UV_PROCESS_SETGID)) {
- /* When dropping privileges from root, the `setgroups` call will
- * remove any extraneous groups. If we don't call this, then
- * even though our uid has dropped, we may still have groups
- * that enable us to do super-user things. This will fail if we
- * aren't root, so don't bother checking the return value, this
- * is just done as an optimistic privilege dropping function.
- */
- SAVE_ERRNO(setgroups(0, NULL));
- }
-
- if ((options->flags & UV_PROCESS_SETGID) && setgid(options->gid)) {
- uv__write_int(error_fd, UV__ERR(errno));
- _exit(127);
- }
-
- if ((options->flags & UV_PROCESS_SETUID) && setuid(options->uid)) {
- uv__write_int(error_fd, UV__ERR(errno));
- _exit(127);
- }
-
if (options->env != NULL) {
environ = options->env;
}