[glib] gutils: Don't use issetugid() on Android
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gutils: Don't use issetugid() on Android
- Date: Thu, 11 Sep 2014 08:07:56 +0000 (UTC)
commit bebfd422af0a2fef422489d04f3b1d87bebd8b92
Author: Sebastian Dröge <sebastian centricular com>
Date: Tue Sep 9 20:18:20 2014 +0200
gutils: Don't use issetugid() on Android
Android had it in older versions but the new 64 bit ABI does not
have it anymore, and some versions of the 32 bit ABI neither.
https://code.google.com/p/android-developer-preview/issues/detail?id=168
https://bugzilla.gnome.org/show_bug.cgi?id=736351
glib/gutils.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/glib/gutils.c b/glib/gutils.c
index 8fd045a..e229d0d 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -2330,8 +2330,13 @@ g_check_setuid (void)
extern int __libc_enable_secure;
return __libc_enable_secure;
}
-#elif defined(HAVE_ISSETUGID)
+#elif defined(HAVE_ISSETUGID) && !defined(__BIONIC__)
/* BSD: http://www.freebsd.org/cgi/man.cgi?query=issetugid&sektion=2 */
+
+ /* Android had it in older versions but the new 64 bit ABI does not
+ * have it anymore, and some versions of the 32 bit ABI neither.
+ * https://code.google.com/p/android-developer-preview/issues/detail?id=168
+ */
return issetugid ();
#elif defined(G_OS_UNIX)
uid_t ruid, euid, suid; /* Real, effective and saved user ID's */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]