summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Szyndela <adrian.s@samsung.com>2020-02-03 15:47:01 +0100
committerAdrian Szyndela <adrian.s@samsung.com>2020-02-03 16:41:24 +0100
commitbf767259523e6d197d9058ebe06704af18ad62a1 (patch)
treea86534e59cc2e0744bdd2823a684c735accaafca
parent5bd4fa30c29ee933593b972a28e731cdb7b0fefd (diff)
downloadglib-bf767259523e6d197d9058ebe06704af18ad62a1.tar.gz
glib-bf767259523e6d197d9058ebe06704af18ad62a1.tar.bz2
glib-bf767259523e6d197d9058ebe06704af18ad62a1.zip
Don't bail out with error if getauxval(AT_SECURE) fails. Instead, set the result of checking suid to FALSE (no suid). Apparently, Tizen is built with qemu version < 2.12. qemu 2.12 introduces providing AT_SECURE in auxiliary vector, and the only purpose of using getauxval in glib is to get AT_SECURE. If g_check_setuid() bails out with error, some packages may not build, as their building process requires executing tools that call g_check_setuid(). As stated in commit a7fefb0e4e, getauxval(AT_SECURE) should always success... This commit may be reverted if all the builds are made within qemu >= 2.12. Change-Id: I7d0ee9745fea35e9d9337ccffaf5234b2211be02
-rw-r--r--glib/gutils.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/glib/gutils.c b/glib/gutils.c
index 988d0a599..ec272e824 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -2607,7 +2607,24 @@ g_check_setuid (void)
value = getauxval (AT_SECURE);
errsv = errno;
if (errsv)
- g_error ("getauxval () failed: %s", g_strerror (errsv));
+ {
+/*
+ Apparently, Tizen is built with qemu version < 2.12.
+
+ qemu 2.12 introduces providing AT_SECURE in auxiliary vector,
+ and the only purpose of using getauxval in glib is to get AT_SECURE.
+
+ If g_check_setuid() bails out with error, some packages may not build,
+ as their building process requires executing tools that call g_check_setuid().
+
+ So, don't bail out with error if getauxval(AT_SECURE) fails.
+ Instead, set the result of checking suid to FALSE (no suid).
+
+ It may be reverted if all the builds are made within qemu >= 2.12.
+*/
+/* g_error ("getauxval () failed: %s", g_strerror (errsv));*/
+ return FALSE;
+ }
return value;
#elif defined(HAVE_ISSETUGID) && !defined(__BIONIC__)
/* BSD: http://www.freebsd.org/cgi/man.cgi?query=issetugid&sektion=2 */