glib: handle failing getauxval(AT_SECURE) 44/223744/2 submit/tizen/20200203.160801 submit/tizen/20200207.061642 submit/tizen/20200210.073336
authorAdrian Szyndela <adrian.s@samsung.com>
Mon, 3 Feb 2020 14:47:01 +0000 (15:47 +0100)
committerAdrian Szyndela <adrian.s@samsung.com>
Mon, 3 Feb 2020 15:41:24 +0000 (16:41 +0100)
commitbf767259523e6d197d9058ebe06704af18ad62a1
treea86534e59cc2e0744bdd2823a684c735accaafca
parent5bd4fa30c29ee933593b972a28e731cdb7b0fefd
glib: handle failing getauxval(AT_SECURE)

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
glib/gutils.c