diff options
author | Brent Cook <bcook@openbsd.org> | 2015-02-16 22:22:29 -0600 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-02-17 18:15:17 -0600 |
commit | a859b93ff583300349ee0b7fb8231cf6c387e269 (patch) | |
tree | 4ae03e67df0c83b43e645e0743de94b92478cf4c /crypto/compat | |
parent | adc416e922f98b4b52093f26c91216e3b4106f3d (diff) | |
download | portable-a859b93ff583300349ee0b7fb8231cf6c387e269.tar.gz portable-a859b93ff583300349ee0b7fb8231cf6c387e269.tar.bz2 portable-a859b93ff583300349ee0b7fb8231cf6c387e269.zip |
disable system issetugid on OS X since it is not fork-safe
Noticed while testing similar code for AIX.
ok beck@
Diffstat (limited to 'crypto/compat')
-rw-r--r-- | crypto/compat/issetugid_osx.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crypto/compat/issetugid_osx.c b/crypto/compat/issetugid_osx.c new file mode 100644 index 0000000..ad6cb58 --- /dev/null +++ b/crypto/compat/issetugid_osx.c | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * issetugid implementation for OS X | ||
3 | * Public domain | ||
4 | */ | ||
5 | |||
6 | #include <unistd.h> | ||
7 | |||
8 | /* | ||
9 | * OS X has issetugid, but it is not fork-safe as of version 10.10. | ||
10 | * See this Solaris report for test code that fails similarly: | ||
11 | * http://mcarpenter.org/blog/2013/01/15/solaris-issetugid%282%29-bug | ||
12 | */ | ||
13 | int issetugid(void) | ||
14 | { | ||
15 | return 1; | ||
16 | } | ||