mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 03:02:10 +01:00
Remove unused HAVE_LIBC_ENABLE_SECURE
It was added in 4c2928a544829 to potentially enable accessing AT_SECURE through __libc_enable_secure, but was never enabled. Newer glibc provides getauxval(AT_SECURE) which should be used instead. Add a TODO note for that.
This commit is contained in:
parent
e03f83212d
commit
41165b2a7e
@ -250,9 +250,6 @@
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
#mesondefine HAVE_LC_MESSAGES
|
||||
|
||||
/* Define if you have the __libc_enable_secure variable (GNU libc, eglibc) */
|
||||
#mesondefine HAVE_LIBC_ENABLE_SECURE
|
||||
|
||||
/* Define if libelf is available */
|
||||
#mesondefine HAVE_LIBELF
|
||||
|
||||
|
@ -254,9 +254,6 @@
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
/* #undef HAVE_LC_MESSAGES */
|
||||
|
||||
/* Define if you have the __libc_enable_secure variable (GNU libc, eglibc) */
|
||||
/* #undef HAVE_LIBC_ENABLE_SECURE */
|
||||
|
||||
/* Define if libelf is available */
|
||||
/* #undef HAVE_LIBELF */
|
||||
|
||||
|
11
configure.ac
11
configure.ac
@ -506,17 +506,6 @@ AC_CHECK_FUNCS(mmap posix_memalign memalign valloc fsync pipe2 issetugid)
|
||||
AC_CHECK_FUNCS(timegm gmtime_r)
|
||||
AC_FUNC_STRERROR_R()
|
||||
|
||||
AC_CACHE_CHECK([for __libc_enable_secure], glib_cv_have_libc_enable_secure,
|
||||
[AC_TRY_LINK([#include <unistd.h>
|
||||
extern int __libc_enable_secure;],
|
||||
[return __libc_enable_secure;],
|
||||
glib_cv_have_libc_enable_secure=yes,
|
||||
glib_cv_have_libc_enable_secure=no)])
|
||||
AS_IF([test x$glib_cv_have_libc_enable_secure = xyes], [
|
||||
AC_DEFINE(HAVE_LIBC_ENABLE_SECURE, 1,
|
||||
[Define if you have the __libc_enable_secure variable (GNU libc, eglibc)])
|
||||
])
|
||||
|
||||
AC_CHECK_SIZEOF(char)
|
||||
AC_CHECK_SIZEOF(short)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
|
@ -2495,23 +2495,14 @@ const gchar *g_get_tmp_dir_utf8 (void) { return g_get_tmp_dir (); }
|
||||
|
||||
/* Private API:
|
||||
*
|
||||
* Returns %TRUE if the current process was executed as setuid (or an
|
||||
* equivalent __libc_enable_secure is available). See:
|
||||
* http://osdir.com/ml/linux.lfs.hardened/2007-04/msg00032.html
|
||||
* Returns %TRUE if the current process was executed as setuid
|
||||
*/
|
||||
gboolean
|
||||
g_check_setuid (void)
|
||||
{
|
||||
/* TODO: get __libc_enable_secure exported from glibc.
|
||||
* See http://www.openwall.com/lists/owl-dev/2012/08/14/1
|
||||
*/
|
||||
#if 0 && defined(HAVE_LIBC_ENABLE_SECURE)
|
||||
{
|
||||
/* See glibc/include/unistd.h */
|
||||
extern int __libc_enable_secure;
|
||||
return __libc_enable_secure;
|
||||
}
|
||||
#elif defined(HAVE_ISSETUGID) && !defined(__BIONIC__)
|
||||
/* TODO: use getauxval(AT_SECURE) if available */
|
||||
|
||||
#if defined(HAVE_ISSETUGID) && !defined(__BIONIC__)
|
||||
/* BSD: http://www.freebsd.org/cgi/man.cgi?query=issetugid&sektion=2 */
|
||||
|
||||
/* Android had it in older versions but the new 64 bit ABI does not
|
||||
|
Loading…
x
Reference in New Issue
Block a user