mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-05 15:38:44 +02:00
g_check_setuid: implement using getauxval(AT_SECURE) with glibc
See commit 4c2928a544
for why checking AT_SECURE is preferable compared
to UID checks as currently done in the fallback case.
getauxval() was added with glibc 2.16
While glibc <2.19 didn't provide a way to differentiate a 0 return value from an error,
passing AT_SECURE should always succeed according to
https://sourceware.org/ml/libc-alpha/2014-07/msg00407.html
I've added an errno check anyway, to be on the safe side.
This commit is contained in:
@@ -229,6 +229,7 @@ headers = [
|
||||
'stdlib.h',
|
||||
'string.h',
|
||||
'strings.h',
|
||||
'sys/auxv.h',
|
||||
'sys/event.h',
|
||||
'sys/filio.h',
|
||||
'sys/inotify.h',
|
||||
|
Reference in New Issue
Block a user