diff options
author | Christoph Reiter <creiter@src.gnome.org> | 2018-05-31 11:31:23 +0200 |
---|---|---|
committer | Christoph Reiter <creiter@src.gnome.org> | 2018-05-31 12:02:36 +0200 |
commit | a7fefb0e4ef17883f55a0798c925c6f8d98ae964 (patch) | |
tree | 6bf5c3a251fc10fcd69d5b7a9db10ae1d638b141 /meson.build | |
parent | 41165b2a7e5e73daa7555486a90ccfa300160906 (diff) | |
download | glib-a7fefb0e4ef17883f55a0798c925c6f8d98ae964.tar.gz |
g_check_setuid: implement using getauxval(AT_SECURE) with glibc
See commit 4c2928a544829 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.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 6eb67cff2..a89ca55cd 100644 --- a/meson.build +++ b/meson.build @@ -229,6 +229,7 @@ headers = [ 'stdlib.h', 'string.h', 'strings.h', + 'sys/auxv.h', 'sys/event.h', 'sys/filio.h', 'sys/inotify.h', |