2022-03-26 17:43:05 +01:00
|
|
|
diff '--color=auto' -uNr node-v17.8.0.orig/deps/uv/src/unix/process.c node-v17.8.0/deps/uv/src/unix/process.c
|
|
|
|
--- node-v17.8.0.orig/deps/uv/src/unix/process.c 2022-03-26 22:11:02.595459286 +0530
|
|
|
|
+++ node-v17.8.0/deps/uv/src/unix/process.c 2022-03-26 22:12:00.385459264 +0530
|
2022-03-11 16:03:32 +01:00
|
|
|
@@ -303,23 +303,6 @@
|
2021-09-11 07:30:44 +02:00
|
|
|
if (options->cwd != NULL && chdir(options->cwd))
|
|
|
|
uv__write_errno(error_fd);
|
2019-09-23 00:41:28 +02:00
|
|
|
|
|
|
|
- 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));
|
|
|
|
- }
|
|
|
|
-
|
2021-09-11 07:30:44 +02:00
|
|
|
- if ((options->flags & UV_PROCESS_SETGID) && setgid(options->gid))
|
|
|
|
- uv__write_errno(error_fd);
|
2019-09-23 00:41:28 +02:00
|
|
|
-
|
2021-09-11 07:30:44 +02:00
|
|
|
- if ((options->flags & UV_PROCESS_SETUID) && setuid(options->uid))
|
|
|
|
- uv__write_errno(error_fd);
|
2019-09-23 00:41:28 +02:00
|
|
|
-
|
|
|
|
if (options->env != NULL) {
|
|
|
|
environ = options->env;
|
|
|
|
}
|