fix from Peter Samuelson for use-after-free bug parsing wildcards in sudoers
[debian/sudo] / configure.in
index 72f108e0f6e6de8b045532f3a3485af11c182aa0..109fc9a721f750e3893fd5b7734d555bde58da18 100644 (file)
@@ -1,6 +1,6 @@
 dnl
 dnl Process this file with GNU autoconf to produce a configure script.
-dnl $Sudo: configure.in,v 1.413.2.49 2008/03/23 14:22:33 millert Exp $
+dnl $Sudo: configure.in,v 1.413.2.53 2008/06/22 20:23:56 millert Exp $
 dnl
 dnl Copyright (c) 1994-1996,1998-2007 Todd C. Miller <Todd.Miller@courtesan.com>
 dnl
@@ -1709,7 +1709,7 @@ dnl
 AC_FUNC_GETGROUPS
 AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf tzset \
               strftime setrlimit initgroups getgroups fstat gettimeofday \
-              setlocale getaddrinfo)
+              setlocale getaddrinfo setsid)
 if test -z "$SKIP_SETRESUID"; then
     AC_CHECK_FUNCS(setresuid, [SKIP_SETREUID=yes])
 fi
@@ -1867,8 +1867,13 @@ if test ${with_pam-"no"} != "no"; then
            esac], AC_MSG_RESULT(yes))
        case $host in
            *-*-linux*|*-*-solaris*)
-                   AC_CHECK_FUNCS(dgettext, [],
-                       [AC_CHECK_LIB(intl, dgettext, [LIBS="${LIBS} -lintl"]
+                   # dgettext() may be defined to dgettext_libintl in the
+                   # header file, so first check that it links w/ additional
+                   # libs, then try with -lintl
+                   AC_LINK_IFELSE([AC_LANG_PROGRAM(
+                   [[#include <libintl.h>]], [(void)dgettext((char *)0, (char *)0);])],
+                   [AC_DEFINE(HAVE_DGETTEXT)],
+                   [AC_CHECK_LIB(intl, dgettext, [LIBS="${LIBS} -lintl"]
                        [AC_DEFINE(HAVE_DGETTEXT)])])
                    ;;
        esac
@@ -2323,7 +2328,7 @@ if test ${with_ldap-'no'} != "no"; then
     AC_CHECK_FUNCS(ldap_initialize ldap_start_tls_s ldapssl_init ldapssl_set_strength)
     AC_CHECK_HEADERS([ldap_ssl.h] [mps/ldap_ssl.h], [break], [], [#include <ldap.h>])
 
-    SUDO_LIBS="${SUDO_LIBS}${LDAP_LIBS}"
+    SUDO_LIBS="${SUDO_LIBS} ${LDAP_LIBS}"
     LIBS="$_LIBS"
     LDFLAGS="$_LDFLAGS"
     # XXX - OpenLDAP has deprecated ldap_get_values()