summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/sudo/CHANGES12
-rw-r--r--usr.bin/sudo/Makefile.in4
-rw-r--r--usr.bin/sudo/TROUBLESHOOTING2
-rw-r--r--usr.bin/sudo/auth/pam.c10
-rw-r--r--usr.bin/sudo/config.h3
-rw-r--r--usr.bin/sudo/config.h.in3
-rw-r--r--usr.bin/sudo/configure85
-rw-r--r--usr.bin/sudo/configure.in28
-rw-r--r--usr.bin/sudo/interfaces.c16
-rw-r--r--usr.bin/sudo/interfaces.h6
-rw-r--r--usr.bin/sudo/parse.c22
-rw-r--r--usr.bin/sudo/parse.yacc2
-rw-r--r--usr.bin/sudo/testsudoers.c22
-rw-r--r--usr.bin/sudo/version.h4
14 files changed, 150 insertions, 69 deletions
diff --git a/usr.bin/sudo/CHANGES b/usr.bin/sudo/CHANGES
index 74810ac7611..41812ca4238 100644
--- a/usr.bin/sudo/CHANGES
+++ b/usr.bin/sudo/CHANGES
@@ -1975,3 +1975,15 @@ Sudo 1.6.9p5 released.
624) inttypes.h is now included when appropriate if it is present.
625) Simplified alias allocation in the parser.
+
+Sudo 1.6.9p6 released.
+
+626) Go back to using TCSAFLUSH instead of TCSADRAIN when turning
+ off echo in tgetpass().
+
+627) Fixed addition of -lutil for logincap on FreeBSD and NetBSD.
+
+628) Add configure check for struct in6_addr since some systems define
+ AF_INET6 but have no real IPv6 support.
+
+Sudo 1.6.9p7 released.
diff --git a/usr.bin/sudo/Makefile.in b/usr.bin/sudo/Makefile.in
index 3b47966bdce..19ebf6f09ff 100644
--- a/usr.bin/sudo/Makefile.in
+++ b/usr.bin/sudo/Makefile.in
@@ -20,7 +20,7 @@
#
# @configure_input@
#
-# $Sudo: Makefile.in,v 1.246.2.16 2007/10/09 13:29:20 millert Exp $
+# $Sudo: Makefile.in,v 1.246.2.17 2007/10/25 15:52:02 millert Exp $
#
#### Start of system configuration section. ####
@@ -131,7 +131,7 @@ TESTOBJS = interfaces.o testsudoers.o $(PARSEOBJS)
LIBOBJS = @LIBOBJS@ @ALLOCA@
-VERSION = 1.6.9p6
+VERSION = 1.6.9p7
DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES HISTORY INSTALL INSTALL.configure \
LICENSE Makefile.in PORTING README README.LDAP \
diff --git a/usr.bin/sudo/TROUBLESHOOTING b/usr.bin/sudo/TROUBLESHOOTING
index 5af41c52390..4bf571bf31d 100644
--- a/usr.bin/sudo/TROUBLESHOOTING
+++ b/usr.bin/sudo/TROUBLESHOOTING
@@ -162,7 +162,7 @@ A) Some SVR4-derived OS's include a /usr/bin/cd command for reasons
unfathomable. A "cd" command is totally useless since a child process
cannot affect the current working directory of the parent (your shell).
-Q) When I run sudo it says I am not alllowed to run the command as root
+Q) When I run sudo it says I am not allowed to run the command as root
but I don't want to run it as root, I want to run it as another user.
My sudoers file entry looks like:
bob ALL=(oracle) ALL
diff --git a/usr.bin/sudo/auth/pam.c b/usr.bin/sudo/auth/pam.c
index f4693f08e08..20dd82543d9 100644
--- a/usr.bin/sudo/auth/pam.c
+++ b/usr.bin/sudo/auth/pam.c
@@ -63,7 +63,7 @@
#endif
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: pam.c,v 1.43.2.4 2007/07/22 12:14:53 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: pam.c,v 1.43.2.7 2007/10/09 00:06:06 millert Exp $";
#endif /* lint */
static int sudo_conv __P((int, PAM_CONST struct pam_message **,
@@ -99,10 +99,10 @@ pam_init(pw, promptp, auth)
* will cause a crash if PAM_TTY is not set so if
* there is no tty, set PAM_TTY to the empty string.
*/
- if (strcmp(user_tty, "unknown") == 0)
+ if (user_ttypath == NULL)
(void) pam_set_item(pamh, PAM_TTY, "");
else
- (void) pam_set_item(pamh, PAM_TTY, user_tty);
+ (void) pam_set_item(pamh, PAM_TTY, user_ttypath);
return(AUTH_SUCCESS);
}
@@ -190,9 +190,11 @@ pam_prep_user(pw)
/*
* Set PAM_USER to the user we are changing *to* and
* set PAM_RUSER to the user we are coming *from*.
+ * We set PAM_RHOST to avoid a bug in Solaris 7 and below.
*/
(void) pam_set_item(pamh, PAM_USER, pw->pw_name);
(void) pam_set_item(pamh, PAM_RUSER, user_name);
+ (void) pam_set_item(pamh, PAM_RHOST, user_host);
/*
* Set credentials (may include resource limits, device ownership, etc).
@@ -204,6 +206,7 @@ pam_prep_user(pw)
*/
(void) pam_setcred(pamh, PAM_ESTABLISH_CRED);
+#ifndef NO_PAM_SESSION
/*
* To fully utilize PAM sessions we would need to keep a
* sudo process around until the command exits. However, we
@@ -215,6 +218,7 @@ pam_prep_user(pw)
return(AUTH_FAILURE);
}
(void) pam_close_session(pamh, 0);
+#endif
if (pam_end(pamh, PAM_SUCCESS | PAM_DATA_SILENT) == PAM_SUCCESS)
return(AUTH_SUCCESS);
diff --git a/usr.bin/sudo/config.h b/usr.bin/sudo/config.h
index f9c491e7501..96dfb42dff7 100644
--- a/usr.bin/sudo/config.h
+++ b/usr.bin/sudo/config.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.h,v 1.6 2007/09/03 15:19:55 millert Exp $ */
+/* $OpenBSD: config.h,v 1.7 2007/10/25 16:08:12 millert Exp $ */
#ifndef _SUDO_CONFIG_H
#define _SUDO_CONFIG_H
@@ -26,6 +26,7 @@
#define HAVE_GETIFADDRS 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_GLOB 1
+#define HAVE_IN6_ADDR 1
#define HAVE_INITGROUPS 1
#define HAVE_INNETGR 1
#define HAVE_INTTYPES_H 1
diff --git a/usr.bin/sudo/config.h.in b/usr.bin/sudo/config.h.in
index 8e4af59f9fc..a8004201efb 100644
--- a/usr.bin/sudo/config.h.in
+++ b/usr.bin/sudo/config.h.in
@@ -171,6 +171,9 @@
/* Define to 1 if your Kerberos is Heimdal. */
#undef HAVE_HEIMDAL
+/* Define to 1 if <netinet/in.h> contains struct in6_addr. */
+#undef HAVE_IN6_ADDR
+
/* Define to 1 if you have the `initgroups' function. */
#undef HAVE_INITGROUPS
diff --git a/usr.bin/sudo/configure b/usr.bin/sudo/configure
index b691ec4f9ae..14fc1edc93d 100644
--- a/usr.bin/sudo/configure
+++ b/usr.bin/sudo/configure
@@ -13674,6 +13674,11 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
+ case "$OS" in
+ freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil"
+ ;;
+ esac
+
fi
done
@@ -14068,10 +14073,8 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
-# include <time.h>
-#else
-# include <sys/time.h>
#endif
+#include <time.h>
typedef struct timespec ac__type_new_;
int
@@ -14121,6 +14124,73 @@ _ACEOF
fi
+{ echo "$as_me:$LINENO: checking for struct in6_addr" >&5
+echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6; }
+if test "${ac_cv_type_struct_in6_addr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <netinet/in.h>
+
+typedef struct in6_addr ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_struct_in6_addr=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_struct_in6_addr=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_in6_addr" >&5
+echo "${ECHO_T}$ac_cv_type_struct_in6_addr" >&6; }
+if test $ac_cv_type_struct_in6_addr = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_IN6_ADDR 1
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IN6_ADDR 1
+_ACEOF
+
+fi
+
{ echo "$as_me:$LINENO: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
if test "${sudo_cv_type_size_t+set}" = set; then
@@ -20535,13 +20605,6 @@ done
LIBS="$_LIBS"
fi
-if test ${with_logincap-'no'} = "yes"; then
- case "$OS" in
- freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil"
- ;;
- esac
-fi
-
if test ${with_AFS-'no'} = "yes"; then
# looks like the "standard" place for AFS libs is /usr/afsws/lib
@@ -23384,3 +23447,5 @@ fi
+
+
diff --git a/usr.bin/sudo/configure.in b/usr.bin/sudo/configure.in
index 1ff46fadea4..196f8a0dfa7 100644
--- a/usr.bin/sudo/configure.in
+++ b/usr.bin/sudo/configure.in
@@ -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.24 2007/10/09 00:06:05 millert Exp $
+dnl $Sudo: configure.in,v 1.413.2.27 2007/10/24 16:43:25 millert Exp $
dnl
dnl Copyright (c) 1994-1996,1998-2007 Todd C. Miller <Todd.Miller@courtesan.com>
dnl
@@ -1632,7 +1632,12 @@ if test "$OS" != "ultrix"; then
fi
fi
if test ${with_logincap-'no'} != "no"; then
- AC_CHECK_HEADERS(login_cap.h)
+ AC_CHECK_HEADERS(login_cap.h, [
+ case "$OS" in
+ freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil"
+ ;;
+ esac
+ ])
fi
if test ${with_project-'no'} != "no"; then
AC_CHECK_HEADER(project.h, AC_DEFINE(HAVE_PROJECT_H)
@@ -1650,10 +1655,10 @@ AC_CHECK_TYPES([sigaction_t], [AC_DEFINE(HAVE_SIGACTION_T)], [], [#include <sys/
AC_CHECK_TYPE([struct timespec], [AC_DEFINE(HAVE_TIMESPEC)], [], [#include <sys/types.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
-# include <time.h>
-#else
-# include <sys/time.h>
-#endif])
+#endif
+#include <time.h>])
+AC_CHECK_TYPES([struct in6_addr], [AC_DEFINE(HAVE_IN6_ADDR)], [], [#include <sys/types.h>
+#include <netinet/in.h>])
SUDO_TYPE_SIZE_T
SUDO_TYPE_SSIZE_T
SUDO_TYPE_DEV_T
@@ -2060,16 +2065,6 @@ if test ${with_kerb5-'no'} != "no" -a -z "$KRB5CONFIG"; then
fi
dnl
-dnl Some systems put login_cap(3) in libutil
-dnl
-if test ${with_logincap-'no'} = "yes"; then
- case "$OS" in
- freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil"
- ;;
- esac
-fi
-
-dnl
dnl extra AFS libs and includes
dnl
if test ${with_AFS-'no'} = "yes"; then
@@ -2411,6 +2406,7 @@ AH_TEMPLATE(HAVE_GETPWANAM, [Define to 1 if you have the `getpwanam' function. (
AH_TEMPLATE(HAVE_GETSPNAM, [Define to 1 if you have the `getspnam' function (SVR4-style shadow passwords)])
AH_TEMPLATE(HAVE_GETSPWUID, [Define to 1 if you have the `getspwuid' function. (HP-UX <= 9.X shadow passwords)])
AH_TEMPLATE(HAVE_HEIMDAL, [Define to 1 if your Kerberos is Heimdal.])
+AH_TEMPLATE(HAVE_IN6_ADDR, [Define to 1 if <netinet/in.h> contains struct in6_addr.])
AH_TEMPLATE(HAVE_ISCOMSEC, [Define to 1 if you have the `iscomsec' function. (HP-UX >= 10.x check for shadow enabled)])
AH_TEMPLATE(HAVE_ISSECURE, [Define to 1 if you have the `issecure' function. (SunOS 4.x check for shadow enabled)])
AH_TEMPLATE(HAVE_KERB4, [Define to 1 if you use Kerberos IV.])
diff --git a/usr.bin/sudo/interfaces.c b/usr.bin/sudo/interfaces.c
index b3dc14e9145..f03acc042fa 100644
--- a/usr.bin/sudo/interfaces.c
+++ b/usr.bin/sudo/interfaces.c
@@ -89,7 +89,7 @@ struct rtentry;
#include "interfaces.h"
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: interfaces.c,v 1.72.2.6 2007/08/14 15:19:25 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: interfaces.c,v 1.72.2.7 2007/10/24 16:43:26 millert Exp $";
#endif /* lint */
@@ -104,7 +104,7 @@ load_interfaces()
{
struct ifaddrs *ifa, *ifaddrs;
struct sockaddr_in *sin;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct sockaddr_in6 *sin6;
#endif
int i;
@@ -121,7 +121,7 @@ load_interfaces()
switch(ifa->ifa_addr->sa_family) {
case AF_INET:
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
#endif
num_interfaces++;
@@ -151,7 +151,7 @@ load_interfaces()
interfaces[i].family = AF_INET;
i++;
break;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
sin6 = (struct sockaddr_in6 *)ifa->ifa_addr;
memcpy(&interfaces[i].addr, &sin6->sin6_addr,
@@ -162,7 +162,7 @@ load_interfaces()
interfaces[i].family = AF_INET6;
i++;
break;
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
}
}
#ifdef HAVE_FREEIFADDRS
@@ -325,7 +325,7 @@ void
dump_interfaces()
{
int i;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
char addrbuf[INET6_ADDRSTRLEN], maskbuf[INET6_ADDRSTRLEN];
#endif
@@ -336,7 +336,7 @@ dump_interfaces()
printf("\t%s / ", inet_ntoa(interfaces[i].addr.ip4));
puts(inet_ntoa(interfaces[i].netmask.ip4));
break;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
inet_ntop(AF_INET6, &interfaces[i].addr.ip6,
addrbuf, sizeof(addrbuf));
@@ -344,7 +344,7 @@ dump_interfaces()
maskbuf, sizeof(maskbuf));
printf("\t%s / %s\n", addrbuf, maskbuf);
break;
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
}
}
}
diff --git a/usr.bin/sudo/interfaces.h b/usr.bin/sudo/interfaces.h
index de4af008f84..ddb6f84b7ef 100644
--- a/usr.bin/sudo/interfaces.h
+++ b/usr.bin/sudo/interfaces.h
@@ -17,7 +17,7 @@
* Agency (DARPA) and Air Force Research Laboratory, Air Force
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
*
- * $Sudo: interfaces.h,v 1.8.2.2 2007/08/13 16:30:02 millert Exp $
+ * $Sudo: interfaces.h,v 1.8.2.3 2007/10/24 16:43:27 millert Exp $
*/
#ifndef _SUDO_INTERFACES_H
@@ -30,13 +30,13 @@ struct interface {
int family; /* AF_INET or AF_INET6 */
union {
struct in_addr ip4;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct in6_addr ip6;
#endif
} addr;
union {
struct in_addr ip4;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct in6_addr ip6;
#endif
} netmask;
diff --git a/usr.bin/sudo/parse.c b/usr.bin/sudo/parse.c
index 7e31ff3530b..68e197987f1 100644
--- a/usr.bin/sudo/parse.c
+++ b/usr.bin/sudo/parse.c
@@ -90,7 +90,7 @@
#endif /* HAVE_EXTENDED_GLOB */
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: parse.c,v 1.160.2.13 2007/08/25 02:37:11 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: parse.c,v 1.160.2.14 2007/10/24 16:43:27 millert Exp $";
#endif /* lint */
/*
@@ -390,13 +390,13 @@ addr_matches_if(n)
int i;
struct in_addr addr;
struct interface *ifp;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct in6_addr addr6;
int j;
#endif
int family;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
if (inet_pton(AF_INET6, n, &addr6) > 0) {
family = AF_INET6;
} else
@@ -417,7 +417,7 @@ addr_matches_if(n)
== addr.s_addr)
return(TRUE);
break;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
if (memcmp(ifp->addr.ip6.s6_addr, addr6.s6_addr,
sizeof(addr6.s6_addr)) == 0)
@@ -428,7 +428,7 @@ addr_matches_if(n)
}
if (j == sizeof(addr6.s6_addr))
return(TRUE);
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
}
}
@@ -443,13 +443,13 @@ addr_matches_if_netmask(n, m)
int i;
struct in_addr addr, mask;
struct interface *ifp;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct in6_addr addr6, mask6;
int j;
#endif
int family;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
if (inet_pton(AF_INET6, n, &addr6) > 0)
family = AF_INET6;
else
@@ -470,7 +470,7 @@ addr_matches_if_netmask(n, m)
mask.s_addr = htonl(mask.s_addr);
}
}
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
else {
if (inet_pton(AF_INET6, m, &mask6) <= 0) {
j = atoi(m);
@@ -484,7 +484,7 @@ addr_matches_if_netmask(n, m)
}
}
}
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
for (i = 0; i < num_interfaces; i++) {
ifp = &interfaces[i];
@@ -494,7 +494,7 @@ addr_matches_if_netmask(n, m)
case AF_INET:
if ((ifp->addr.ip4.s_addr & mask.s_addr) == addr.s_addr)
return(TRUE);
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
for (j = 0; j < sizeof(addr6.s6_addr); j++) {
if ((ifp->addr.ip6.s6_addr[j] & mask6.s6_addr[j]) != addr6.s6_addr[j])
@@ -502,7 +502,7 @@ addr_matches_if_netmask(n, m)
}
if (j == sizeof(addr6.s6_addr))
return(TRUE);
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
}
}
diff --git a/usr.bin/sudo/parse.yacc b/usr.bin/sudo/parse.yacc
index 5847e2f1272..de81cafc238 100644
--- a/usr.bin/sudo/parse.yacc
+++ b/usr.bin/sudo/parse.yacc
@@ -69,7 +69,7 @@
#endif /* HAVE_LSEARCH */
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: parse.yacc,v 1.204.2.6 2007/08/13 16:30:02 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: parse.yacc,v 1.204.2.7 2007/09/13 23:06:51 millert Exp $";
#endif /* lint */
/*
diff --git a/usr.bin/sudo/testsudoers.c b/usr.bin/sudo/testsudoers.c
index dd9953fe10c..756d331e74e 100644
--- a/usr.bin/sudo/testsudoers.c
+++ b/usr.bin/sudo/testsudoers.c
@@ -75,7 +75,7 @@
#endif /* HAVE_FNMATCH */
#ifndef lint
-__unused static const char rcsid[] = "$Sudo: testsudoers.c,v 1.88.2.5 2007/08/25 02:45:09 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: testsudoers.c,v 1.88.2.6 2007/10/24 16:43:27 millert Exp $";
#endif /* lint */
@@ -180,13 +180,13 @@ addr_matches_if(n)
int i;
struct in_addr addr;
struct interface *ifp;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct in6_addr addr6;
int j;
#endif
int family;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
if (inet_pton(AF_INET6, n, &addr6) > 0) {
family = AF_INET6;
} else
@@ -207,7 +207,7 @@ addr_matches_if(n)
== addr.s_addr)
return(TRUE);
break;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
if (memcmp(ifp->addr.ip6.s6_addr, addr6.s6_addr,
sizeof(addr6.s6_addr)) == 0)
@@ -218,7 +218,7 @@ addr_matches_if(n)
}
if (j == sizeof(addr6.s6_addr))
return(TRUE);
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
}
}
@@ -233,13 +233,13 @@ addr_matches_if_netmask(n, m)
int i;
struct in_addr addr, mask;
struct interface *ifp;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
struct in6_addr addr6, mask6;
int j;
#endif
int family;
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
if (inet_pton(AF_INET6, n, &addr6) > 0)
family = AF_INET6;
else
@@ -260,7 +260,7 @@ addr_matches_if_netmask(n, m)
mask.s_addr = htonl(mask.s_addr);
}
}
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
else {
if (inet_pton(AF_INET6, m, &mask6) <= 0) {
j = atoi(m);
@@ -274,7 +274,7 @@ addr_matches_if_netmask(n, m)
}
}
}
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
for (i = 0; i < num_interfaces; i++) {
ifp = &interfaces[i];
@@ -284,7 +284,7 @@ addr_matches_if_netmask(n, m)
case AF_INET:
if ((ifp->addr.ip4.s_addr & mask.s_addr) == addr.s_addr)
return(TRUE);
-#ifdef AF_INET6
+#ifdef HAVE_IN6_ADDR
case AF_INET6:
for (j = 0; j < sizeof(addr6.s6_addr); j++) {
if ((ifp->addr.ip6.s6_addr[j] & mask6.s6_addr[j]) != addr6.s6_addr[j])
@@ -292,7 +292,7 @@ addr_matches_if_netmask(n, m)
}
if (j == sizeof(addr6.s6_addr))
return(TRUE);
-#endif /* AF_INET6 */
+#endif /* HAVE_IN6_ADDR */
}
}
diff --git a/usr.bin/sudo/version.h b/usr.bin/sudo/version.h
index 0d55e99f169..a069cfb20ad 100644
--- a/usr.bin/sudo/version.h
+++ b/usr.bin/sudo/version.h
@@ -17,12 +17,12 @@
* Agency (DARPA) and Air Force Research Laboratory, Air Force
* Materiel Command, USAF, under agreement number F39502-99-1-0512.
*
- * $Sudo: version.h,v 1.66.2.9 2007/10/09 13:29:20 millert Exp $
+ * $Sudo: version.h,v 1.66.2.10 2007/10/25 15:52:03 millert Exp $
*/
#ifndef _SUDO_VERSION_H
#define _SUDO_VERSION_H
-static const char version[] = "1.6.9p6";
+static const char version[] = "1.6.9p7";
#endif /* _SUDO_VERSION_H */