File dante-1.4.0-glibc-2.17.patch of Package dante

--- libscompat/issetugid.c.orig	2013-12-13 16:05:15.838297349 -0500
+++ libscompat/issetugid.c	2013-12-13 16:08:08.623285534 -0500
@@ -4,6 +4,7 @@
 #include "autoconf.h"
 #endif /* HAVE_CONFIG_H */
 
+#include <sys/auxv.h>
 #include "osdep.h"
 
 /*
@@ -49,20 +50,12 @@
  *
  */
 
-#if HAVE_LIBC_ENABLE_SECURE
-extern int __libc_enable_secure;
-#endif /* HAVE_LIBC_ENABLE_SECURE */
 
 int
 issetugid(void)
 {
-#if HAVE_LIBC_ENABLE_SECURE
-   if (!__libc_enable_secure)
-      return 0;
-#elif HAVE_LIBC_ENABLE_SECURE_DISABLED
-   if (getuid() == geteuid() && getgid() == getegid())
-      return 0;
-#endif /* HAVE_LIBC_ENABLE_SECURE_DISABLED */
-
-   return 1; /* don't know, better safe than sorry. */
+   unsigned long secure = getauxval(AT_SECURE);
+   if (secure != 0)
+       return 1;
+   return 0;
 }
--- libscompat.m4.orig	2013-12-13 16:11:45.601270697 -0500
+++ libscompat.m4	2013-12-13 16:10:49.916274505 -0500
@@ -263,35 +263,6 @@
     AC_DEFINE(bzero(b, len), memset((b), 0, (len)), [bzero replacement])
 fi
 
-m4_ifdef([dantebuild], [
-#causes problems with packaging, allow test to be turned off
-AC_ARG_WITH(glibc-secure,
-[  --without-glibc-secure  disable libc_enable_secure check @<:@default=detect@:>@],
-[GLIBCSEC=$withval])
-
-if test "${GLIBCSEC}" != no; then
-    AC_MSG_CHECKING([for __libc_enable_secure])
-    AC_TRY_RUN([
-extern int __libc_enable_secure;
-
-int main()
-{
-    if (__libc_enable_secure == 0)
-	return 0;
-
-	return 1;
-}],[AC_MSG_RESULT([yes])
-    AC_DEFINE(HAVE_LIBC_ENABLE_SECURE, 1, [Linux version of issetugid()])],
-   [AC_MSG_RESULT([no])],
-   [dnl assume no when cross-compiling
-    AC_MSG_RESULT([assuming no])])
-fi
-],
-[AC_DEFINE(HAVE_LIBC_ENABLE_SECURE, 0, [not used])])
-if test x"$GLIBCSEC" = xno; then
-   AC_DEFINE(HAVE_LIBC_ENABLE_SECURE_DISABLED, 1, [glibc variable disable])
-fi
-
 L_PIPETYPE()
 
 AC_MSG_CHECKING([for FIONREAD socket support])
--- include/autoconf.h.in.orig	2013-12-13 16:13:44.171262589 -0500
+++ include/autoconf.h.in	2013-12-13 16:14:48.444258194 -0500
@@ -566,12 +566,6 @@
 /* Define to 1 if you have the `crypt' library (-lcrypt). */
 #undef HAVE_LIBCRYPT
 
-/* Linux version of issetugid() */
-#undef HAVE_LIBC_ENABLE_SECURE
-
-/* glibc variable disable */
-#undef HAVE_LIBC_ENABLE_SECURE_DISABLED
-
 /* Define to 1 if you have the `des' library (-ldes). */
 #undef HAVE_LIBDES