mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
when using MinGW do not try to chdir to /tmp
because it does not always exist. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18690 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
49957806ae
commit
9f84bb2533
1 changed files with 2 additions and 1 deletions
|
@ -4618,13 +4618,14 @@ printf(
|
||||||
/*
|
/*
|
||||||
* As another level of paranoia - restrict this process to /tmp
|
* As another level of paranoia - restrict this process to /tmp
|
||||||
*/
|
*/
|
||||||
|
#ifndef __MINGW__
|
||||||
if (chdir("/tmp") < 0)
|
if (chdir("/tmp") < 0)
|
||||||
{
|
{
|
||||||
sprintf(ebuf, "Unable to change directory to /tmp");
|
sprintf(ebuf, "Unable to change directory to /tmp");
|
||||||
gdomap_log(LOG_CRIT);
|
gdomap_log(LOG_CRIT);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
#ifndef __MINGW__
|
|
||||||
if (geteuid() == 0)
|
if (geteuid() == 0)
|
||||||
{
|
{
|
||||||
if (chroot("/tmp") < 0)
|
if (chroot("/tmp") < 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue