diff --git a/src/bin/system/e_system_main.c b/src/bin/system/e_system_main.c index 0243c2602..7c61d364d 100644 --- a/src/bin/system/e_system_main.c +++ b/src/bin/system/e_system_main.c @@ -201,7 +201,11 @@ setuid_setup(void) } // change CWD to / to avoid path search dlopens finding libs in ./ - chdir("/"); + if (chdir("/") != 0) + { + ERR("Unable to change working dir to /\n"); + exit(1); + } // die with parent - special as this is setuid #ifdef HAVE_PRCTL