Files
termux-packages/packages/nodejs-lts/deps-uv-src-unix-process.c.patch
termux-pacman-bot 04edb498c3 chore(main/nodejs-lts): pick up changes for how we configure from nodejs
Although --debug is not needed currently for nodejs-lts, let's pick it
up before it is actually needed. Also would make things much more
standard between the two packages
2025-12-10 10:42:59 +00:00

27 lines
1.0 KiB
Diff

--- ./deps/uv/src/unix/process.c.orig 2022-11-23 18:29:41.212329442 +0530
+++ ./deps/uv/src/unix/process.c 2022-11-23 18:32:37.602329375 +0530
@@ -351,23 +351,6 @@
if (options->cwd != NULL && chdir(options->cwd))
uv__write_errno(error_fd);
- 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_errno(error_fd);
-
- if ((options->flags & UV_PROCESS_SETUID) && setuid(options->uid))
- uv__write_errno(error_fd);
-
if (options->env != NULL)
environ = options->env;