diff --git a/src/bin/system/e_system_main.c b/src/bin/system/e_system_main.c index 5822eb936..6739dda4a 100644 --- a/src/bin/system/e_system_main.c +++ b/src/bin/system/e_system_main.c @@ -123,6 +123,8 @@ setuid_setup(void) fprintf(stderr, "Unable to set $HOME environment\n"); exit(1); } + // change CWD to / to avoid path search dlopens finding libs in ./ + chdir("/"); // die with parent - special as this is setuid #ifdef HAVE_PRCTL