diff --git a/Tools/gdomap.c b/Tools/gdomap.c index 50582a0b0..e6b0b1184 100644 --- a/Tools/gdomap.c +++ b/Tools/gdomap.c @@ -4618,13 +4618,14 @@ printf( /* * As another level of paranoia - restrict this process to /tmp */ +#ifndef __MINGW__ if (chdir("/tmp") < 0) { sprintf(ebuf, "Unable to change directory to /tmp"); gdomap_log(LOG_CRIT); exit(EXIT_FAILURE); } -#ifndef __MINGW__ + if (geteuid() == 0) { if (chroot("/tmp") < 0)