From 71b62aa1cdbdec3724c8e451f621309994dc59a0 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Tue, 29 May 2018 16:30:35 +0200 Subject: common: Don't rely on issetugid() when it is broken On macOS and FreeBSD, issetugid() has different semantics from the original OpenBSD implementation and cannot reliably detect if the process made setuid/setgid: https://gist.github.com/nicowilliams/4daf74a3a0c86848d3cbd9d0cdb5e26e This should fix: https://bugs.freedesktop.org/show_bug.cgi?id=67451 https://bugs.freedesktop.org/show_bug.cgi?id=100287 --- common/compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/compat.c') diff --git a/common/compat.c b/common/compat.c index 2e559c7..1153f95 100644 --- a/common/compat.c +++ b/common/compat.c @@ -805,7 +805,7 @@ getauxval (unsigned long type) extern int __libc_enable_secure; secure = __libc_enable_secure; -#elif defined(HAVE_ISSETUGID) +#elif defined(HAVE_ISSETUGID) && defined(HAVE_ISSETUGID_OPENBSD) secure = issetugid (); #elif defined(OS_UNIX) -- cgit v1.1