e system - check chdir return

chdir to / will never fail... it's the root dir.. but let's make
coverity happy.

fix CID 1425454
enlightenment-0.24
Carsten Haitzler 4 years ago
parent 273ec41687
commit 3d490704ca
  1. 6
      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

Loading…
Cancel
Save