diff options
author | Adrian Szyndela <adrian.s@samsung.com> | 2020-02-03 15:47:01 +0100 |
---|---|---|
committer | Adrian Szyndela <adrian.s@samsung.com> | 2020-02-03 16:41:24 +0100 |
commit | bf767259523e6d197d9058ebe06704af18ad62a1 (patch) | |
tree | a86534e59cc2e0744bdd2823a684c735accaafca | |
parent | 5bd4fa30c29ee933593b972a28e731cdb7b0fefd (diff) | |
download | glib-bf767259523e6d197d9058ebe06704af18ad62a1.tar.gz glib-bf767259523e6d197d9058ebe06704af18ad62a1.tar.bz2 glib-bf767259523e6d197d9058ebe06704af18ad62a1.zip |
glib: handle failing getauxval(AT_SECURE)submit/tizen/20200210.073336submit/tizen/20200207.061642submit/tizen/20200203.160801
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.c | 19 |
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 */ |