e sys main - change cwd to avoid loading .so's in ./

fixes T8676
This commit is contained in:
Carsten Haitzler 2020-04-22 12:35:32 +01:00
parent fc26d91ac0
commit d42605f5c0
1 changed files with 2 additions and 0 deletions

View File

@ -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