diff options
Diffstat (limited to 'girepository/girepository.c')
-rw-r--r-- | girepository/girepository.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/girepository/girepository.c b/girepository/girepository.c index 4723c951..97074a8c 100644 --- a/girepository/girepository.c +++ b/girepository/girepository.c @@ -27,6 +27,10 @@ #include <string.h> #include <stdlib.h> +#ifdef HAVE_GETAUXVAL +#include <sys/auxv.h> +#endif + #include <glib.h> #include <glib/gprintf.h> #include <gmodule.h> @@ -147,6 +151,14 @@ init_globals (void) if (!g_once_init_enter (&initialized)) return; +#ifdef HAVE_GETAUXVAL + if (getauxval (AT_SECURE)) + { + g_printerr ("error: libgirepository.so (gobject-introspection) is not audited for use in setuid applications\nSee https://bugzilla.gnome.org/show_bug.cgi?id=755472\n"); + _exit (1); + } +#endif + if (default_repository == NULL) default_repository = g_object_new (G_TYPE_IREPOSITORY, NULL); |