disable system issetugid on OS X since it is not fork-safe

Noticed while testing similar code for AIX.
ok beck@
This commit is contained in:
Brent Cook
2015-02-16 22:22:29 -06:00
parent adc416e922
commit a859b93ff5
3 changed files with 24 additions and 0 deletions

View File

@@ -103,6 +103,9 @@ endif
if HOST_HPUX
libcompat_la_SOURCES += compat/issetugid_hpux.c
endif
if HOST_DARWIN
libcompat_la_SOURCES += compat/issetugid_osx.c
endif
if HOST_WIN
libcompat_la_SOURCES += compat/issetugid_win.c
endif

View File

@@ -0,0 +1,16 @@
/*
* issetugid implementation for OS X
* Public domain
*/
#include <unistd.h>
/*
* OS X has issetugid, but it is not fork-safe as of version 10.10.
* See this Solaris report for test code that fails similarly:
* http://mcarpenter.org/blog/2013/01/15/solaris-issetugid%282%29-bug
*/
int issetugid(void)
{
return 1;
}