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:
parent
adc416e922
commit
a859b93ff5
@ -226,6 +226,11 @@ AM_CONDITIONAL([HAVE_ARC4RANDOM_BUF],
|
||||
-a "x$HOST_OS" != xnetbsd \
|
||||
-a "x$ac_cv_func_arc4random_buf" = xyes])
|
||||
|
||||
# overrides for issetugid implementations with known issues
|
||||
AM_CONDITIONAL([HAVE_ISSETUGID],
|
||||
[test "x$HOST_OS" != xdarwin
|
||||
-a "x$ac_cv_func_issetugid" = xyes])
|
||||
|
||||
AC_CACHE_CHECK([whether va_copy exists], ac_cv_have_va_copy, [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <stdarg.h>
|
||||
|
@ -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
|
||||
|
16
crypto/compat/issetugid_osx.c
Normal file
16
crypto/compat/issetugid_osx.c
Normal 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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user