]> granicus.if.org Git - sudo/commitdiff
o BSDi also has a bogus setreuid()
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 18 Jan 2002 19:18:39 +0000 (19:18 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 18 Jan 2002 19:18:39 +0000 (19:18 +0000)
o Old FreeBSD has a bogus setreuid()
o new NetBSD has a real setreuid()
o add check for freeifaddrs() if getifaddrs() exists.

configure.in

index 6fda996551b38eb63e141d6208d335c414f81147..653fde00873297730b34a4fe01430afb8d603949 100644 (file)
@@ -1423,6 +1423,7 @@ case "$host" in
                test -n "$mansectform" || mansectform=4
                ;;
     *-*-bsdi*)
+               BROKEN_SETREUID=yes
                # Use shlicc for BSD/OS [23].x unless asked to do otherwise
                if test "${with_CC+set}" != set -a "$ac_cv_prog_CC" = gcc; then
                    case "$OSREV" in
@@ -1434,6 +1435,13 @@ case "$host" in
                fi
                ;;
     *-*-freebsd*)
+               # FreeBSD has a real setreuid(2) starting with 2.1 and
+               # backported to 2.0.5.  We just take 2.1 and above...
+               case "`echo $host_os | sed 's/^freebsd\([[0-9\.]]*\).*$/\1/'`" in
+               0.*|1.*|2.0*)
+                   BROKEN_SETREUID=yes
+                   ;;
+               esac
                if test "$with_logincap" = "yes"; then
                    SUDO_LIBS="${SUDO_LIBS} -lutil"
                fi
@@ -1451,7 +1459,12 @@ case "$host" in
                fi
                ;;
     *-*-*netbsd*)
-               BROKEN_SETREUID=yes
+               # NetBSD has a real setreuid(2) starting with 1.3.2
+               case "`echo $host_os | sed 's/^netbsd\([[0-9\.]]*\).*$/\1/'`" in
+               0.9*|1.[012]*|1.3|1.3.1)
+                   BROKEN_SETREUID=yes
+                   ;;
+               esac
                if test "$CHECKSHADOW" = "true"; then
                    CHECKSHADOW="false"
                fi
@@ -1561,7 +1574,7 @@ if test -z "$BROKEN_SETREUID"; then
     AC_CHECK_FUNCS(setreuid)
 fi
 if test X"$with_interfaces" != X"no"; then
-    AC_CHECK_FUNCS(getifaddrs)
+    AC_CHECK_FUNCS(getifaddrs, AC_CHECK_FUNCS(freeifaddrs))
 fi
 if test -n "$SECUREWARE"; then
     AC_CHECK_FUNCS(bigcrypt set_auth_parameters initprivs)