uwsgi/uwsgi_fix_chroot_chdir.patch
Ralf Ertzinger 8fe9ce38dd Update to 2.0.20
Fix build against PHP8
Remove support for EL6
General logic cleanup and removal of dead code from the spec file
Add --verbose to build step to show compiler settings
2022-02-02 20:32:34 +01:00

14 lines
375 B
Diff

diff -uNr a/core/utils.c b/core/utils.c
--- a/core/utils.c 2021-10-06 07:22:45.000000000 +0200
+++ b/core/utils.c 2022-01-23 12:19:10.715602147 +0100
@@ -593,6 +593,10 @@
uwsgi_error("chroot()");
exit(1);
}
+ if (chdir("/")) {
+ uwsgi_error("chdir()");
+ exit(1);
+ }
uwsgi.is_chrooted = 1;
#ifdef __linux__
if (uwsgi.logging_options.memory_report) {