Imported Debian patch 1.6.9p8-1 debian/1.6.9p8-1
authorBdale Garbee <bdale@gag.com>
Sat, 24 Nov 2007 04:11:11 +0000 (21:11 -0700)
committerBdale Garbee <bdale@gag.com>
Wed, 14 May 2008 18:04:03 +0000 (12:04 -0600)
24 files changed:
CHANGES
Makefile.in
auth/pam.c
config.h.in
configure
configure.in
debian/OPTIONS
debian/README.Debian
debian/changelog
debian/rules
interfaces.c
interfaces.h
parse.c
parse.yacc
sudo.cat
sudo.man.in
sudo.tab.c
sudoers.cat
sudoers.man.in
testsudoers.c
tgetpass.c
version.h
visudo.cat
visudo.man.in

diff --git a/CHANGES b/CHANGES
index 74810ac7611362e7bce75a43f1fd7c756a7f9836..a3797a3f151ac5d2d4477e95f2c8f8f434ae42eb 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1975,3 +1975,21 @@ 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.
+
+629) Fixed a bug where a sudoers entry with no runas user specified
+     was treated differently from a line with the default runas
+     user specified.
+
+Sudo 1.6.9p8 released.
index 4bb1f6a412ca33ddfe7efea727efbf6696dfa470..5919cc322db80ca256c080d32528d10438f19071 100644 (file)
@@ -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.18 2007/11/02 19:15:16 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.9p8
 
 DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES HISTORY INSTALL INSTALL.configure \
             LICENSE Makefile.in PORTING README README.LDAP \
index 20dd82543d93a0f1db1ecbf7fcae0eb1fed9b6ab..acdd2035476b9fa359f3f8f9e44b93d01578a3df 100644 (file)
@@ -254,9 +254,11 @@ sudo_conv(num_msg, msg, response, appdata_ptr)
            case PAM_PROMPT_ECHO_ON:
                SET(flags, TGP_ECHO);
            case PAM_PROMPT_ECHO_OFF:
-               /* Only override PAM prompt if it matches /^Password: ?/ */
-               if (strncmp(pm->msg, "Password:", 9) || (pm->msg[9] != '\0'
-                   && (pm->msg[9] != ' ' || pm->msg[10] != '\0')))
+               /* Only override PAM prompt if it matches /^Password: ?/ *
+                * or if the user explicitly requested a prompt.         */
+               if (!user_prompt &&
+                   (strncmp(pm->msg, "Password:", 9) || (pm->msg[9] != '\0'
+                   && (pm->msg[9] != ' ' || pm->msg[10] != '\0'))))
                    p = pm->msg;
                /* Read the password. */
                pass = tgetpass(p, def_passwd_timeout * 60, flags);
index 8e4af59f9fca5eaaa1feed5ee1d2c166d8da0fc7..a8004201efba9a2adc1f9c268d3093b5fd12b939 100644 (file)
 /* 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
 
index b691ec4f9ae4fede271cb3d391ed569d82208860..1c604ed71731eecc2a6d13a7928bc9420078a54b 100755 (executable)
--- a/configure
+++ b/configure
@@ -1436,7 +1436,7 @@ Fine tuning of the installation directories:
   --bindir=DIR           user executables [EPREFIX/bin]
   --sbindir=DIR          system admin executables [EPREFIX/sbin]
   --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --sysconfdir=DIR       read-only single-machine data [etc]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
   --libdir=DIR           object code libraries [EPREFIX/lib]
@@ -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
@@ -17368,7 +17438,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-DIR d; (void)dirfd(&d);
+DIR *d; (void)dirfd(d);
   ;
   return 0;
 }
@@ -17674,7 +17744,7 @@ else
 echo "$as_me: WARNING: unable to find socket() trying -lsocket -lnsl" >&2;}
 { echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
-if test "${ac_cv_lib_socket_socket_lnsl+set}" = set; then
+if test "${ac_cv_lib_socket_socket+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17719,21 +17789,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_socket_socket_lnsl=yes
+  ac_cv_lib_socket_socket=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_socket_socket_lnsl=no
+       ac_cv_lib_socket_socket=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket_lnsl" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_socket_lnsl" >&6; }
-if test $ac_cv_lib_socket_socket_lnsl = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
+if test $ac_cv_lib_socket_socket = yes; then
   NET_LIBS="${NET_LIBS} -lsocket -lnsl"; LIBS="${LIBS} -lsocket -lnsl"
 fi
 
@@ -18043,7 +18113,7 @@ else
 echo "$as_me: WARNING: unable to find inet_addr() trying -lsocket -lnsl" >&2;}
 { echo "$as_me:$LINENO: checking for inet_addr in -lsocket" >&5
 echo $ECHO_N "checking for inet_addr in -lsocket... $ECHO_C" >&6; }
-if test "${ac_cv_lib_socket_inet_addr_lnsl+set}" = set; then
+if test "${ac_cv_lib_socket_inet_addr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -18088,21 +18158,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_socket_inet_addr_lnsl=yes
+  ac_cv_lib_socket_inet_addr=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_socket_inet_addr_lnsl=no
+       ac_cv_lib_socket_inet_addr=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_inet_addr_lnsl" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_inet_addr_lnsl" >&6; }
-if test $ac_cv_lib_socket_inet_addr_lnsl = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_inet_addr" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_inet_addr" >&6; }
+if test $ac_cv_lib_socket_inet_addr = yes; then
   NET_LIBS="${NET_LIBS} -lsocket -lnsl"; LIBS="${LIBS} -lsocket -lnsl"
 fi
 
@@ -19479,7 +19549,7 @@ if test ${with_SecurID-'no'} != "no"; then
     #
     { echo "$as_me:$LINENO: checking for SD_Init in -laceclnt" >&5
 echo $ECHO_N "checking for SD_Init in -laceclnt... $ECHO_C" >&6; }
-if test "${ac_cv_lib_aceclnt_SD_Init_______lpthread_______+set}" = set; then
+if test "${ac_cv_lib_aceclnt_SD_Init+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -19527,21 +19597,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_aceclnt_SD_Init_______lpthread_______=yes
+  ac_cv_lib_aceclnt_SD_Init=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_aceclnt_SD_Init_______lpthread_______=no
+       ac_cv_lib_aceclnt_SD_Init=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_aceclnt_SD_Init_______lpthread_______" >&5
-echo "${ECHO_T}$ac_cv_lib_aceclnt_SD_Init_______lpthread_______" >&6; }
-if test $ac_cv_lib_aceclnt_SD_Init_______lpthread_______ = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_aceclnt_SD_Init" >&5
+echo "${ECHO_T}$ac_cv_lib_aceclnt_SD_Init" >&6; }
+if test $ac_cv_lib_aceclnt_SD_Init = yes; then
 
            AUTH_OBJS="$AUTH_OBJS securid5.o";
            SUDO_LIBS="${SUDO_LIBS} -laceclnt -lpthread"
@@ -20023,10 +20093,9 @@ echo "${ECHO_T}no" >&6; }
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-                as_ac_Lib=`echo "ac_cv_lib_krb_main$K4LIBS" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for main in -lkrb" >&5
+                { echo "$as_me:$LINENO: checking for main in -lkrb" >&5
 echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+if test "${ac_cv_lib_krb_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -20065,29 +20134,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_krb_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_Lib=no"
+       ac_cv_lib_krb_main=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-ac_res=`eval echo '${'$as_ac_Lib'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5
+echo "${ECHO_T}$ac_cv_lib_krb_main" >&6; }
+if test $ac_cv_lib_krb_main = yes; then
   K4LIBS="-lkrb $K4LIBS"
 else
 
-       as_ac_Lib=`echo "ac_cv_lib_krb4_main$K4LIBS" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
+       { echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+if test "${ac_cv_lib_krb4_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -20126,22 +20193,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  eval "$as_ac_Lib=yes"
+  ac_cv_lib_krb4_main=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_Lib=no"
+       ac_cv_lib_krb4_main=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-ac_res=`eval echo '${'$as_ac_Lib'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
+echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6; }
+if test $ac_cv_lib_krb4_main = yes; then
   K4LIBS="-lkrb4 $K4LIBS"
 else
   K4LIBS="-lkrb $K4LIBS"
@@ -20535,13 +20601,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
@@ -23381,6 +23440,8 @@ fi
 
 
 
+
+
 
 
 
index 1ff46fadea43b3677e8cb66e6feb5e7e963c161b..4971462c4e8444c9301eb0a58b33c20afe481716 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.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
@@ -1727,7 +1732,7 @@ dnl
 dnl Check for the dirfd function/macro.  If not found, look for dd_fd in DIR.
 dnl
 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#include <$ac_header_dirent>]], [[DIR d; (void)dirfd(&d);]])], [AC_DEFINE(HAVE_DIRFD)], [AC_TRY_LINK([#include <sys/types.h>
+#include <$ac_header_dirent>]], [[DIR *d; (void)dirfd(d);]])], [AC_DEFINE(HAVE_DIRFD)], [AC_TRY_LINK([#include <sys/types.h>
 #include <$ac_header_dirent>], [DIR d; memset(&d, 0, sizeof(d)); return(d.dd_fd);], [AC_DEFINE(HAVE_DD_FD)])])
 dnl
 dnl If NEED_SNPRINTF is set, add snprintf.c to LIBOBJS
@@ -2059,16 +2064,6 @@ if test ${with_kerb5-'no'} != "no" -a -z "$KRB5CONFIG"; then
     LIBS="$_LIBS"
 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
@@ -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.])
index 8f7f3182b58a28026594225edabf50b808413061..d40a2e74b82b694a240f5d8f5c08719c3506b256 100644 (file)
@@ -10,7 +10,7 @@ The following options were used to configure sudo for Debian GNU/Linux.
 
   --with-ldap
 
-       Support for LDAP authentication.
+       Support for LDAP authentication, in the sudo-ldap package version only.
 
   --with-fqdn 
 
@@ -26,10 +26,10 @@ The following options were used to configure sudo for Debian GNU/Linux.
        Where logging information goes.
 
   --with-env-editor 
-  --with-editor=/usr/bin/editor 
+  --with-editor=/usr/bin/vi
 
        Honor the EDITOR and VISUAL environment variables.  If they are not
-       present, default to the Debian default system editor.
+       present, default to the preferred vi alternative currently installed.
 
   --with-timeout=15 
   --with-password-timeout=0 
index 48333fc9a17c8d7c0009c046b1e1f51222547ace..ae4212f661bdbc4ae109ed013a45ac92c3ef2875 100644 (file)
@@ -19,9 +19,22 @@ Preserve the default variables plus all variables starting with LC_:
 
     Defaults env_keep+="LC_*"
 
+       - - - - -
+
+If you're using the sudo-ldap package, note that it is now configured to 
+look for /etc/sudo-ldap.conf.  Depending on your system configuration, it
+probably makes sense for this to be a symlink to /etc/ldap.conf, or perhaps
+to /etc/libnss-ldap.conf or /etc/pam_ldap.conf.  By default, no symlink or
+file is provided, you'll need to decide what to do and create a suitable
+file before sudo-ldap will work.
+
+       - - - - -
+
 See the file OPTIONS in this directory for more information on the sudo
 build options used in building the Debian package.
 
+       - - - - -
+
 If you're having trouble grasping the fundamental idea of what sudo is all
 about, here's a succinct and humorous take on it...   
 
index fe90d0fa3c8628387c70d8d682b41d8537adf69e..0750a287a9c33de2d5bf5c46f9fa0e72a51fb95f 100644 (file)
@@ -1,3 +1,18 @@
+sudo (1.6.9p8-1) UNRELEASED; urgency=low
+
+  * new upstream version
+  * debian/rules: configure a more informative default password prompt to 
+    reduce confusion when using sudo to invoke commands which also ask for 
+    passwords, closes: #343268
+  * auth/pam.c: don't use the PAM prompt if the user explicitly requested 
+    a custom prompt, closes: #448628.
+  * fix configure's ability to discover that libc has dirfd, closes: #451324
+  * make default editor be /usr/bin/vi instead of /usr/bin/editor, so that
+    the command 'visudo' invokes a vi variant by default as documented,
+    closes: #388659
+
+ -- Bdale Garbee <bdale@gag.com>  Fri, 23 Nov 2007 21:11:11 -0700
+
 sudo (1.6.9p6-1) unstable; urgency=low
 
   * new upstream version, closes: #442815, #446146, #438699, #435768, #435314
index 5796fcaf7d02af5522f5efc272c75ce26523c875..7bd9cb8c52b8513a51b48f1828ca6d673b798a2b 100755 (executable)
@@ -19,11 +19,13 @@ config-stamp:
                --with-all-insults \
                --with-devel --with-pam --with-fqdn \
                --with-logging=syslog --with-logfac=authpriv \
-               --with-env-editor --with-editor=/usr/bin/editor \
+               --with-env-editor --with-editor=/usr/bin/vi \
                --with-timeout=15 --with-password-timeout=0 \
+               --with-passprompt="[sudo] password for %u:" \
                --disable-root-mailer --disable-setresuid \
                --with-sendmail=/usr/sbin/sendmail \
                --mandir=/usr/share/man --libexecdir=/usr/lib/sudo \
+               --with-ldap-conf-file=/etc/sudo-ldap.conf \
                --with-secure-path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
 
        # LDAP version
@@ -33,8 +35,9 @@ config-stamp:
                --with-all-insults \
                --with-exempt=sudo --with-pam --with-ldap --with-fqdn \
                --with-logging=syslog --with-logfac=authpriv \
-               --with-env-editor --with-editor=/usr/bin/editor \
+               --with-env-editor --with-editor=/usr/bin/vi \
                --with-timeout=15 --with-password-timeout=0 \
+               --with-passprompt="[sudo] password for %u:" \
                --disable-root-mailer --disable-setresuid \
                --with-sendmail=/usr/sbin/sendmail \
                --with-ldap-conf-file=/etc/ldap/ldap.conf \
index b3dc14e91454a9475c1a5fa70e335b092dc31cb9..f03acc042fa299c929cd94b3e8eb666c1856995a 100644 (file)
@@ -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 */
        }
     }
 }
index de4af008f84d2f7019543db6f120f70303f826eb..ddb6f84b7ef06e91863b4d20c85bcd6f1f120895 100644 (file)
@@ -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/parse.c b/parse.c
index 7e31ff3530b66381845e500fb7b55b86dd088702..68e197987f1fd978c40e0d094dd486418513f118 100644 (file)
--- a/parse.c
+++ b/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 */
        }
     }
 
index 9db13f56838aeaed42eea2d80a44d982f0dc92bb..00c2a15e94c4e278f070b5ca4f1be81c58a5d85e 100644 (file)
@@ -69,7 +69,7 @@
 #endif /* HAVE_LSEARCH */
 
 #ifndef lint
-__unused static const char rcsid[] = "$Sudo: parse.yacc,v 1.204.2.7 2007/09/13 23:06:51 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: parse.yacc,v 1.204.2.8 2007/11/02 19:09:01 millert Exp $";
 #endif /* lint */
 
 /*
@@ -508,9 +508,8 @@ runasspec   :       /* empty */ {
                             * then check against default runas user.
                             */
                            if (runas_matches == UNSPEC) {
-                               runas_matches =
-                                   userpw_matches(def_runas_default,
-                                       *user_runas, runas_pw);
+                               runas_matches = userpw_matches(def_runas_default,
+                                   *user_runas, runas_pw) ? TRUE : NOMATCH;
                            }
                        }
                |       RUNAS runaslist {
index 2fc093328f9fa04a47a5de46f1adc4073b7373a5..036f360290e5085759c2d449d1de2103475ab626 100644 (file)
--- a/sudo.cat
+++ b/sudo.cat
@@ -61,7 +61,7 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
 
 
-1.6.9p6                  October  9, 2007                       1
+1.6.9p8                 November  2, 2007                       1
 
 
 
@@ -127,7 +127,7 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
 
 
 
-1.6.9p6                  October  9, 2007                       2
+1.6.9p8                 November  2, 2007                       2
 
 
 
@@ -193,7 +193,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
 
-1.6.9p6                  October  9, 2007                       3
+1.6.9p8                 November  2, 2007                       3
 
 
 
@@ -259,7 +259,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
 
-1.6.9p6                  October  9, 2007                       4
+1.6.9p8                 November  2, 2007                       4
 
 
 
@@ -325,7 +325,7 @@ S\bSE\bEC\bCU\bUR\bRI\bIT\bTY\bY N\bNO\bOT\bTE\bES\bS
 
 
 
-1.6.9p6                  October  9, 2007                       5
+1.6.9p8                 November  2, 2007                       5
 
 
 
@@ -391,7 +391,7 @@ SUDO(1m)               MAINTENANCE COMMANDS              SUDO(1m)
 
 
 
-1.6.9p6                  October  9, 2007                       6
+1.6.9p8                 November  2, 2007                       6
 
 
 
@@ -457,7 +457,7 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
 
 
 
-1.6.9p6                  October  9, 2007                       7
+1.6.9p8                 November  2, 2007                       7
 
 
 
@@ -523,7 +523,7 @@ C\bCA\bAV\bVE\bEA\bAT\bTS\bS
 
 
 
-1.6.9p6                  October  9, 2007                       8
+1.6.9p8                 November  2, 2007                       8
 
 
 
@@ -589,6 +589,6 @@ D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
 
 
 
-1.6.9p6                  October  9, 2007                       9
+1.6.9p8                 November  2, 2007                       9
 
 
index 1ccfabf24d685537e4dee67d925564c8e52630d5..48c9b16a0e07125f54e46e695564c9d2baaaa94d 100644 (file)
@@ -18,7 +18,7 @@
 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
 .\" 
-.\" $Sudo: sudo.man.in,v 1.29.2.13 2007/10/09 13:30:47 millert Exp $
+.\" $Sudo: sudo.man.in,v 1.29.2.15 2007/11/02 19:15:16 millert Exp $
 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\"
 .IX Title "SUDO @mansectsu@"
-.TH SUDO @mansectsu@ "October  9, 2007" "1.6.9p6" "MAINTENANCE COMMANDS"
+.TH SUDO @mansectsu@ "November  2, 2007" "1.6.9p8" "MAINTENANCE COMMANDS"
 .SH "NAME"
 sudo, sudoedit \- execute a command as another user
 .SH "SYNOPSIS"
index 6740c724f305b5b0f0e6d686f7047812d68dfb92..1d4b9b70a0104dc4a394bef2d17286ff0d0329c2 100644 (file)
@@ -4,7 +4,7 @@ static char yyrcsid[]
 #if __GNUC__ >= 2
   __attribute__ ((unused))
 #endif /* __GNUC__ >= 2 */
-  = "$OpenBSD: skeleton.c,v 1.26 2006/04/20 16:51:32 deraadt Exp $";
+  = "$OpenBSD: skeleton.c,v 1.28 2007/09/03 21:14:58 deraadt Exp $";
 #endif
 #include <stdlib.h>
 #define YYBYACC 1
@@ -72,9 +72,6 @@ static char yyrcsid[]
 # include <unistd.h>
 #endif /* HAVE_UNISTD_H */
 #include <pwd.h>
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #if defined(YYBISON) && defined(HAVE_ALLOCA_H) && !defined(__GNUC__)
 # include <alloca.h>
 #endif /* YYBISON && HAVE_ALLOCA_H && !__GNUC__ */
@@ -90,7 +87,7 @@ static char yyrcsid[]
 #endif /* HAVE_LSEARCH */
 
 #ifndef lint
-__unused static const char rcsid[] = "$Sudo: sudo.tab.c,v 1.76.2.6 2007/08/13 16:30:47 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: sudo.tab.c,v 1.76.2.7 2007/11/02 19:09:22 millert Exp $";
 #endif /* lint */
 
 /*
@@ -216,7 +213,7 @@ static void append          __P((char *, char **, size_t *, size_t *, char *));
 static void expand_ga_list     __P((void));
 static void expand_match_list  __P((void));
 static aliasinfo *find_alias   __P((char *, int));
-static int  more_aliases       __P((void));
+static void more_aliases       __P((void));
        void init_parser                __P((void));
        void yyerror            __P((char *));
 
@@ -237,7 +234,7 @@ yyerror(s)
     }
     parse_error = TRUE;
 }
-#line 224 "parse.yacc"
+#line 221 "parse.yacc"
 #ifndef YYSTYPE_DEFINED
 #define YYSTYPE_DEFINED
 typedef union {
@@ -247,7 +244,7 @@ typedef union {
     int tok;
 } YYSTYPE;
 #endif /* YYSTYPE_DEFINED */
-#line 251 "sudo.tab.c"
+#line 248 "sudo.tab.c"
 #define COMMAND 257
 #define ALIAS 258
 #define DEFVAR 259
@@ -674,7 +671,7 @@ short *yyss;
 short *yysslim;
 YYSTYPE *yyvs;
 int yystacksize;
-#line 909 "parse.yacc"
+#line 905 "parse.yacc"
 
 #define MOREALIASES (32)
 aliasinfo *aliases = NULL;
@@ -733,12 +730,8 @@ add_alias(alias, type, val)
     size_t onaliases;
     char s[512];
 
-    if (naliases >= nslots && !more_aliases()) {
-       (void) snprintf(s, sizeof(s), "Out of memory defining alias `%s'",
-                       alias);
-       yyerror(s);
-       return(FALSE);
-    }
+    if (naliases >= nslots)
+       more_aliases();
 
     ai.type = type;
     ai.val = val;
@@ -782,17 +775,12 @@ find_alias(alias, type)
 /*
  * Allocates more space for the aliases list.
  */
-static int
+static void
 more_aliases()
 {
 
     nslots += MOREALIASES;
-    if (nslots == MOREALIASES)
-       aliases = (aliasinfo *) malloc(nslots * sizeof(aliasinfo));
-    else
-       aliases = (aliasinfo *) realloc(aliases, nslots * sizeof(aliasinfo));
-
-    return(aliases != NULL);
+    aliases = (aliasinfo *) erealloc3(aliases, nslots, sizeof(aliasinfo));
 }
 
 /*
@@ -1039,7 +1027,7 @@ init_parser()
     if (printmatches == TRUE)
        expand_match_list();
 }
-#line 991 "sudo.tab.c"
+#line 979 "sudo.tab.c"
 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
 #if defined(__cplusplus) || defined(__STDC__)
 static int yygrowstack(void)
@@ -1058,14 +1046,23 @@ static int yygrowstack()
     else if ((newsize *= 2) > YYMAXDEPTH)
         newsize = YYMAXDEPTH;
     i = yyssp - yyss;
+#ifdef SIZE_MAX
+#define YY_SIZE_MAX SIZE_MAX
+#else
+#define YY_SIZE_MAX 0xffffffffU
+#endif
+    if (newsize && YY_SIZE_MAX / newsize < sizeof *newss)
+        goto bail;
     newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) :
-      (short *)malloc(newsize * sizeof *newss);
+      (short *)malloc(newsize * sizeof *newss); /* overflow check above */
     if (newss == NULL)
         goto bail;
     yyss = newss;
     yyssp = newss + i;
+    if (newsize && YY_SIZE_MAX / newsize < sizeof *newvs)
+        goto bail;
     newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) :
-      (YYSTYPE *)malloc(newsize * sizeof *newvs);
+      (YYSTYPE *)malloc(newsize * sizeof *newvs); /* overflow check above */
     if (newvs == NULL)
         goto bail;
     yyvs = newvs;
@@ -1233,85 +1230,85 @@ yyreduce:
     switch (yyn)
     {
 case 3:
-#line 280 "parse.yacc"
+#line 277 "parse.yacc"
 { ; }
 break;
 case 4:
-#line 282 "parse.yacc"
+#line 279 "parse.yacc"
 { yyerrok; }
 break;
 case 5:
-#line 283 "parse.yacc"
+#line 280 "parse.yacc"
 { push; }
 break;
 case 6:
-#line 283 "parse.yacc"
+#line 280 "parse.yacc"
 {
                            while (top && user_matches != TRUE)
                                pop;
                        }
 break;
 case 7:
-#line 288 "parse.yacc"
+#line 285 "parse.yacc"
 { ; }
 break;
 case 8:
-#line 290 "parse.yacc"
+#line 287 "parse.yacc"
 { ; }
 break;
 case 9:
-#line 292 "parse.yacc"
+#line 289 "parse.yacc"
 { ; }
 break;
 case 10:
-#line 294 "parse.yacc"
+#line 291 "parse.yacc"
 { ; }
 break;
 case 11:
-#line 296 "parse.yacc"
+#line 293 "parse.yacc"
 { ; }
 break;
 case 13:
-#line 302 "parse.yacc"
+#line 299 "parse.yacc"
 {
                            defaults_matches = TRUE;
                        }
 break;
 case 14:
-#line 305 "parse.yacc"
+#line 302 "parse.yacc"
 { push; }
 break;
 case 15:
-#line 305 "parse.yacc"
+#line 302 "parse.yacc"
 {
                            defaults_matches = user_matches;
                            pop;
                        }
 break;
 case 16:
-#line 309 "parse.yacc"
+#line 306 "parse.yacc"
 { push; }
 break;
 case 17:
-#line 309 "parse.yacc"
+#line 306 "parse.yacc"
 {
                            defaults_matches = yyvsp[0].BOOLEAN == TRUE;
                            pop;
                        }
 break;
 case 18:
-#line 313 "parse.yacc"
+#line 310 "parse.yacc"
 { push; }
 break;
 case 19:
-#line 313 "parse.yacc"
+#line 310 "parse.yacc"
 {
                            defaults_matches = host_matches;
                            pop;
                        }
 break;
 case 22:
-#line 323 "parse.yacc"
+#line 320 "parse.yacc"
 {
                            if (defaults_matches == TRUE &&
                                !set_default(yyvsp[0].string, NULL, TRUE)) {
@@ -1322,7 +1319,7 @@ case 22:
                        }
 break;
 case 23:
-#line 331 "parse.yacc"
+#line 328 "parse.yacc"
 {
                            if (defaults_matches == TRUE &&
                                !set_default(yyvsp[0].string, NULL, FALSE)) {
@@ -1333,7 +1330,7 @@ case 23:
                        }
 break;
 case 24:
-#line 339 "parse.yacc"
+#line 336 "parse.yacc"
 {
                            if (defaults_matches == TRUE &&
                                !set_default(yyvsp[-2].string, yyvsp[0].string, TRUE)) {
@@ -1345,7 +1342,7 @@ case 24:
                        }
 break;
 case 25:
-#line 348 "parse.yacc"
+#line 345 "parse.yacc"
 {
                            if (defaults_matches == TRUE &&
                                !set_default(yyvsp[-2].string, yyvsp[0].string, '+')) {
@@ -1357,7 +1354,7 @@ case 25:
                        }
 break;
 case 26:
-#line 357 "parse.yacc"
+#line 354 "parse.yacc"
 {
                            if (defaults_matches == TRUE &&
                                !set_default(yyvsp[-2].string, yyvsp[0].string, '-')) {
@@ -1369,7 +1366,7 @@ case 26:
                        }
 break;
 case 29:
-#line 372 "parse.yacc"
+#line 369 "parse.yacc"
 {
                            /*
                             * We already did a push if necessary in
@@ -1384,25 +1381,25 @@ case 29:
                        }
 break;
 case 30:
-#line 386 "parse.yacc"
+#line 383 "parse.yacc"
 {
                            SETMATCH(host_matches, yyvsp[0].BOOLEAN);
                        }
 break;
 case 31:
-#line 389 "parse.yacc"
+#line 386 "parse.yacc"
 {
                            SETNMATCH(host_matches, yyvsp[0].BOOLEAN);
                        }
 break;
 case 32:
-#line 394 "parse.yacc"
+#line 391 "parse.yacc"
 {
                            yyval.BOOLEAN = TRUE;
                        }
 break;
 case 33:
-#line 397 "parse.yacc"
+#line 394 "parse.yacc"
 {
                            if (addr_matches(yyvsp[0].string))
                                yyval.BOOLEAN = TRUE;
@@ -1412,7 +1409,7 @@ case 33:
                        }
 break;
 case 34:
-#line 404 "parse.yacc"
+#line 401 "parse.yacc"
 {
                            if (netgr_matches(yyvsp[0].string, user_host, user_shost, NULL))
                                yyval.BOOLEAN = TRUE;
@@ -1422,7 +1419,7 @@ case 34:
                        }
 break;
 case 35:
-#line 411 "parse.yacc"
+#line 408 "parse.yacc"
 {
                            if (hostname_matches(user_shost, user_host, yyvsp[0].string) == 0)
                                yyval.BOOLEAN = TRUE;
@@ -1432,7 +1429,7 @@ case 35:
                        }
 break;
 case 36:
-#line 418 "parse.yacc"
+#line 415 "parse.yacc"
 {
                            aliasinfo *aip = find_alias(yyvsp[0].string, HOST_ALIAS);
 
@@ -1457,7 +1454,7 @@ case 36:
                        }
 break;
 case 39:
-#line 446 "parse.yacc"
+#line 443 "parse.yacc"
 {
                            /*
                             * Push the entry onto the stack if it is worth
@@ -1487,13 +1484,13 @@ case 39:
                        }
 break;
 case 40:
-#line 475 "parse.yacc"
+#line 472 "parse.yacc"
 {
                            SETMATCH(cmnd_matches, yyvsp[0].BOOLEAN);
                        }
 break;
 case 41:
-#line 478 "parse.yacc"
+#line 475 "parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1505,13 +1502,13 @@ case 41:
                        }
 break;
 case 42:
-#line 486 "parse.yacc"
+#line 483 "parse.yacc"
 {
                            SETNMATCH(cmnd_matches, yyvsp[0].BOOLEAN);
                        }
 break;
 case 43:
-#line 491 "parse.yacc"
+#line 488 "parse.yacc"
 {
                            if (printmatches == TRUE && host_matches == TRUE &&
                                user_matches == TRUE) {
@@ -1532,24 +1529,23 @@ case 43:
                             * then check against default runas user.
                             */
                            if (runas_matches == UNSPEC) {
-                               runas_matches =
-                                   userpw_matches(def_runas_default,
-                                       *user_runas, runas_pw);
+                               runas_matches = userpw_matches(def_runas_default,
+                                   *user_runas, runas_pw) ? TRUE : NOMATCH;
                            }
                        }
 break;
 case 44:
-#line 516 "parse.yacc"
+#line 512 "parse.yacc"
 {
                            runas_matches = yyvsp[0].BOOLEAN;
                        }
 break;
 case 45:
-#line 521 "parse.yacc"
+#line 517 "parse.yacc"
 { ; }
 break;
 case 46:
-#line 522 "parse.yacc"
+#line 518 "parse.yacc"
 {
                            /* Later entries override earlier ones. */
                            if (yyvsp[0].BOOLEAN != NOMATCH)
@@ -1559,11 +1555,11 @@ case 46:
                        }
 break;
 case 47:
-#line 531 "parse.yacc"
+#line 527 "parse.yacc"
 { ; }
 break;
 case 48:
-#line 532 "parse.yacc"
+#line 528 "parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1575,14 +1571,14 @@ case 48:
                        }
 break;
 case 49:
-#line 540 "parse.yacc"
+#line 536 "parse.yacc"
 {
                            /* Set $$ to the negation of runasuser */
                            yyval.BOOLEAN = (yyvsp[0].BOOLEAN == NOMATCH ? NOMATCH : ! yyvsp[0].BOOLEAN);
                        }
 break;
 case 50:
-#line 546 "parse.yacc"
+#line 542 "parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1600,7 +1596,7 @@ case 50:
                        }
 break;
 case 51:
-#line 561 "parse.yacc"
+#line 557 "parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1618,7 +1614,7 @@ case 51:
                        }
 break;
 case 52:
-#line 576 "parse.yacc"
+#line 572 "parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1636,7 +1632,7 @@ case 52:
                        }
 break;
 case 53:
-#line 591 "parse.yacc"
+#line 587 "parse.yacc"
 {
                            aliasinfo *aip = find_alias(yyvsp[0].string, RUNAS_ALIAS);
 
@@ -1669,7 +1665,7 @@ case 53:
                        }
 break;
 case 54:
-#line 621 "parse.yacc"
+#line 617 "parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1682,7 +1678,7 @@ case 54:
                        }
 break;
 case 55:
-#line 633 "parse.yacc"
+#line 629 "parse.yacc"
 {
                            /* Inherit {NO,}{PASSWD,EXEC,SETENV} status. */
                            if (printmatches == TRUE && host_matches == TRUE &&
@@ -1703,7 +1699,7 @@ case 55:
                        }
 break;
 case 56:
-#line 651 "parse.yacc"
+#line 647 "parse.yacc"
 {
                            no_passwd = TRUE;
                            if (printmatches == TRUE && host_matches == TRUE &&
@@ -1712,7 +1708,7 @@ case 56:
                        }
 break;
 case 57:
-#line 657 "parse.yacc"
+#line 653 "parse.yacc"
 {
                            no_passwd = FALSE;
                            if (printmatches == TRUE && host_matches == TRUE &&
@@ -1721,7 +1717,7 @@ case 57:
                        }
 break;
 case 58:
-#line 663 "parse.yacc"
+#line 659 "parse.yacc"
 {
                            no_execve = TRUE;
                            if (printmatches == TRUE && host_matches == TRUE &&
@@ -1730,7 +1726,7 @@ case 58:
                        }
 break;
 case 59:
-#line 669 "parse.yacc"
+#line 665 "parse.yacc"
 {
                            no_execve = FALSE;
                            if (printmatches == TRUE && host_matches == TRUE &&
@@ -1739,7 +1735,7 @@ case 59:
                        }
 break;
 case 60:
-#line 675 "parse.yacc"
+#line 671 "parse.yacc"
 {
                            setenv_ok = TRUE;
                            if (printmatches == TRUE && host_matches == TRUE &&
@@ -1748,7 +1744,7 @@ case 60:
                        }
 break;
 case 61:
-#line 681 "parse.yacc"
+#line 677 "parse.yacc"
 {
                            setenv_ok = FALSE;
                            if (printmatches == TRUE && host_matches == TRUE &&
@@ -1757,7 +1753,7 @@ case 61:
                        }
 break;
 case 62:
-#line 689 "parse.yacc"
+#line 685 "parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE)
@@ -1775,7 +1771,7 @@ case 62:
                        }
 break;
 case 63:
-#line 704 "parse.yacc"
+#line 700 "parse.yacc"
 {
                            aliasinfo *aip;
 
@@ -1807,7 +1803,7 @@ case 63:
                        }
 break;
 case 64:
-#line 733 "parse.yacc"
+#line 729 "parse.yacc"
 {
                            if (printmatches == TRUE) {
                                if (in_alias == TRUE) {
@@ -1834,11 +1830,11 @@ case 64:
                        }
 break;
 case 67:
-#line 763 "parse.yacc"
+#line 759 "parse.yacc"
 { push; }
 break;
 case 68:
-#line 763 "parse.yacc"
+#line 759 "parse.yacc"
 {
                            if ((MATCHED(host_matches) || pedantic) &&
                                !add_alias(yyvsp[-3].string, HOST_ALIAS, host_matches)) {
@@ -1849,7 +1845,7 @@ case 68:
                        }
 break;
 case 73:
-#line 781 "parse.yacc"
+#line 777 "parse.yacc"
 {
                            push;
                            if (printmatches == TRUE) {
@@ -1862,7 +1858,7 @@ case 73:
                        }
 break;
 case 74:
-#line 790 "parse.yacc"
+#line 786 "parse.yacc"
 {
                            if ((MATCHED(cmnd_matches) || pedantic) &&
                                !add_alias(yyvsp[-3].string, CMND_ALIAS, cmnd_matches)) {
@@ -1877,11 +1873,11 @@ case 74:
                        }
 break;
 case 75:
-#line 804 "parse.yacc"
+#line 800 "parse.yacc"
 { ; }
 break;
 case 79:
-#line 812 "parse.yacc"
+#line 808 "parse.yacc"
 {
                            if (printmatches == TRUE) {
                                in_alias = TRUE;
@@ -1893,7 +1889,7 @@ case 79:
                        }
 break;
 case 80:
-#line 820 "parse.yacc"
+#line 816 "parse.yacc"
 {
                            if ((yyvsp[0].BOOLEAN != NOMATCH || pedantic) &&
                                !add_alias(yyvsp[-3].string, RUNAS_ALIAS, yyvsp[0].BOOLEAN)) {
@@ -1907,11 +1903,11 @@ case 80:
                        }
 break;
 case 83:
-#line 837 "parse.yacc"
+#line 833 "parse.yacc"
 { push; }
 break;
 case 84:
-#line 837 "parse.yacc"
+#line 833 "parse.yacc"
 {
                            if ((MATCHED(user_matches) || pedantic) &&
                                !add_alias(yyvsp[-3].string, USER_ALIAS, user_matches)) {
@@ -1923,19 +1919,19 @@ case 84:
                        }
 break;
 case 87:
-#line 852 "parse.yacc"
+#line 848 "parse.yacc"
 {
                            SETMATCH(user_matches, yyvsp[0].BOOLEAN);
                        }
 break;
 case 88:
-#line 855 "parse.yacc"
+#line 851 "parse.yacc"
 {
                            SETNMATCH(user_matches, yyvsp[0].BOOLEAN);
                        }
 break;
 case 89:
-#line 860 "parse.yacc"
+#line 856 "parse.yacc"
 {
                            if (userpw_matches(yyvsp[0].string, user_name, sudo_user.pw))
                                yyval.BOOLEAN = TRUE;
@@ -1945,7 +1941,7 @@ case 89:
                        }
 break;
 case 90:
-#line 867 "parse.yacc"
+#line 863 "parse.yacc"
 {
                            if (usergr_matches(yyvsp[0].string, user_name, sudo_user.pw))
                                yyval.BOOLEAN = TRUE;
@@ -1955,7 +1951,7 @@ case 90:
                        }
 break;
 case 91:
-#line 874 "parse.yacc"
+#line 870 "parse.yacc"
 {
                            if (netgr_matches(yyvsp[0].string, NULL, NULL, user_name))
                                yyval.BOOLEAN = TRUE;
@@ -1965,7 +1961,7 @@ case 91:
                        }
 break;
 case 92:
-#line 881 "parse.yacc"
+#line 877 "parse.yacc"
 {
                            aliasinfo *aip = find_alias(yyvsp[0].string, USER_ALIAS);
 
@@ -1990,12 +1986,12 @@ case 92:
                        }
 break;
 case 93:
-#line 903 "parse.yacc"
+#line 899 "parse.yacc"
 {
                            yyval.BOOLEAN = TRUE;
                        }
 break;
-#line 1947 "sudo.tab.c"
+#line 1943 "sudo.tab.c"
     }
     yyssp -= yym;
     yystate = *yyssp;
index dbda5ba4cb43f349be1888c12700027dd246ea2e..044b2aa5dea3eb72bde0f94c2bcf6f39132596ee 100644 (file)
@@ -61,7 +61,7 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
 
 
-1.6.9p6                  October  9, 2007                       1
+1.6.9p8                 November  2, 2007                       1
 
 
 
@@ -127,7 +127,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                       2
+1.6.9p8                 November  2, 2007                       2
 
 
 
@@ -193,7 +193,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                       3
+1.6.9p8                 November  2, 2007                       3
 
 
 
@@ -259,7 +259,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                       4
+1.6.9p8                 November  2, 2007                       4
 
 
 
@@ -325,7 +325,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                       5
+1.6.9p8                 November  2, 2007                       5
 
 
 
@@ -391,7 +391,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                       6
+1.6.9p8                 November  2, 2007                       6
 
 
 
@@ -457,7 +457,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                       7
+1.6.9p8                 November  2, 2007                       7
 
 
 
@@ -523,7 +523,7 @@ S\bSU\bUD\bDO\bOE\bER\bRS\bS O\bOP\bPT\bTI\bIO\bON\bNS\bS
 
 
 
-1.6.9p6                  October  9, 2007                       8
+1.6.9p8                 November  2, 2007                       8
 
 
 
@@ -589,7 +589,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                       9
+1.6.9p8                 November  2, 2007                       9
 
 
 
@@ -655,7 +655,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                      10
+1.6.9p8                 November  2, 2007                      10
 
 
 
@@ -721,7 +721,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                      11
+1.6.9p8                 November  2, 2007                      11
 
 
 
@@ -787,7 +787,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                      12
+1.6.9p8                 November  2, 2007                      12
 
 
 
@@ -853,7 +853,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                      13
+1.6.9p8                 November  2, 2007                      13
 
 
 
@@ -919,7 +919,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                      14
+1.6.9p8                 November  2, 2007                      14
 
 
 
@@ -985,7 +985,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                      15
+1.6.9p8                 November  2, 2007                      15
 
 
 
@@ -1051,7 +1051,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                      16
+1.6.9p8                 November  2, 2007                      16
 
 
 
@@ -1117,7 +1117,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                      17
+1.6.9p8                 November  2, 2007                      17
 
 
 
@@ -1183,7 +1183,7 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
 
 
 
-1.6.9p6                  October  9, 2007                      18
+1.6.9p8                 November  2, 2007                      18
 
 
 
@@ -1249,7 +1249,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                      19
+1.6.9p8                 November  2, 2007                      19
 
 
 
@@ -1315,7 +1315,7 @@ SUDOERS(4)             MAINTENANCE COMMANDS            SUDOERS(4)
 
 
 
-1.6.9p6                  October  9, 2007                      20
+1.6.9p8                 November  2, 2007                      20
 
 
 
@@ -1381,7 +1381,7 @@ S\bSE\bEC\bCU\bUR\bRI\bIT\bTY\bY N\bNO\bOT\bTE\bES\bS
 
 
 
-1.6.9p6                  October  9, 2007                      21
+1.6.9p8                 November  2, 2007                      21
 
 
 
@@ -1447,7 +1447,7 @@ P\bPR\bRE\bEV\bVE\bEN\bNT\bTI\bIN\bNG\bG S\bSH\bHE\bEL\bLL\bL E\bES\bSC\bCA\bAP\bPE\bES\bS
 
 
 
-1.6.9p6                  October  9, 2007                      22
+1.6.9p8                 November  2, 2007                      22
 
 
 
@@ -1513,7 +1513,7 @@ S\bSU\bUP\bPP\bPO\bOR\bRT\bT
 
 
 
-1.6.9p6                  October  9, 2007                      23
+1.6.9p8                 November  2, 2007                      23
 
 
 
@@ -1579,6 +1579,6 @@ D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
 
 
 
-1.6.9p6                  October  9, 2007                      24
+1.6.9p8                 November  2, 2007                      24
 
 
index ed4b46ae6bef653aaa5aae5d61108d4b110341a3..8fc4b24da6edf90f2f6b3d42bb38fdfdf7f9027e 100644 (file)
@@ -18,7 +18,7 @@
 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
 .\" 
-.\" $Sudo: sudoers.man.in,v 1.45.2.15 2007/10/09 13:30:47 millert Exp $
+.\" $Sudo: sudoers.man.in,v 1.45.2.17 2007/11/02 19:15:16 millert Exp $
 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\"
 .IX Title "SUDOERS @mansectform@"
-.TH SUDOERS @mansectform@ "October  9, 2007" "1.6.9p6" "MAINTENANCE COMMANDS"
+.TH SUDOERS @mansectform@ "November  2, 2007" "1.6.9p8" "MAINTENANCE COMMANDS"
 .SH "NAME"
 sudoers \- list of which users may execute what
 .SH "DESCRIPTION"
index dd9953fe10c0e1b48ae129ed44113e0d6c46c868..756d331e74ecf4dc7dfb5a2b380208be4a09a52a 100644 (file)
@@ -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 */
        }
     }
 
index 6e356cd6d7a9dcfee85f85258c8116c38d13ff67..c008c156cddfff2d510791d2b54dffd31e23ed72 100644 (file)
@@ -70,7 +70,7 @@
 #include "sudo.h"
 
 #ifndef lint
-__unused static const char rcsid[] = "$Sudo: tgetpass.c,v 1.111.2.4 2007/10/08 16:01:10 millert Exp $";
+__unused static const char rcsid[] = "$Sudo: tgetpass.c,v 1.111.2.5 2007/10/17 15:39:43 millert Exp $";
 #endif /* lint */
 
 #ifndef TCSASOFT
@@ -89,26 +89,36 @@ __unused static const char rcsid[] = "$Sudo: tgetpass.c,v 1.111.2.4 2007/10/08 1
 #endif
 
 /*
- * Abstract method of getting at the term flags.
+ * QNX 6 (at least) has issues with TCSAFLUSH.
  */
-#undef TERM
-#undef tflags
-#ifdef HAVE_TERMIOS_H
-# define TERM                  termios
-# define tflags                        c_lflag
-# define term_getattr(f, t)    tcgetattr(f, t)
-# define term_setattr(f, t)    tcsetattr(f, TCSADRAIN|TCSASOFT, t)
-#else
+#ifdef __QNX__
+#undef TCSAFLUSH
+#define        TCSAFLUSH       TCSADRAIN
+#endif
+
+/*
+ * Compat macros for non-termios systems.
+ */
+#ifndef HAVE_TERMIOS_H
 # ifdef HAVE_TERMIO_H
-# define TERM                  termio
-# define tflags                        c_lflag
-# define term_getattr(f, t)    ioctl(f, TCGETA, t)
-# define term_setattr(f, t)    ioctl(f, TCSETAF, t)
+#  undef termios
+#  define termios              termio
+#  define tcgetattr(f, t)      ioctl(f, TCGETA, t)
+#  define tcsetattr(f, a, t)   ioctl(f, a, t)
+#  undef TCSAFLUSH
+#  define TCSAFLUSH            TCSETAF
+#  undef TCSANOW
+#  define TCSANOW              TCSETA
 # else
-#  define TERM                 sgttyb
-#  define tflags               sg_flags
-#  define term_getattr(f, t)   ioctl(f, TIOCGETP, t)
-#  define term_setattr(f, t)   ioctl(f, TIOCSETP, t)
+#  undef termios
+#  define termios              sgttyb
+#  define c_lflag              sg_flags
+#  define tcgetattr(f, t)      ioctl(f, TIOCGETP, t)
+#  define tcsetattr(f, a, t)   ioctl(f, a, t)
+#  undef TCSAFLUSH
+#  define TCSAFLUSH            TIOCSETP
+#  undef TCSANOW
+#  define TCSANOW              TIOCSETN
 # endif /* HAVE_TERMIO_H */
 #endif /* HAVE_TERMIOS_H */
 
@@ -128,7 +138,7 @@ tgetpass(prompt, timeout, flags)
 {
     sigaction_t sa, savealrm, saveint, savehup, savequit, saveterm;
     sigaction_t savetstp, savettin, savettou;
-    struct TERM term, oterm;
+    struct termios term, oterm;
     char *pass;
     static char buf[SUDO_PASS_MAX + 1];
     int input, output, save_errno;
@@ -162,14 +172,14 @@ restart:
     (void) sigaction(SIGTTOU, &sa, &savettou);
 
     /* Turn echo off/on as specified by flags.  */
-    if (term_getattr(input, &oterm) == 0) {
+    if (tcgetattr(input, &oterm) == 0) {
        (void) memcpy(&term, &oterm, sizeof(term));
        if (!ISSET(flags, TGP_ECHO))
-           CLR(term.tflags, (ECHO | ECHONL));
+           CLR(term.c_lflag, ECHO|ECHONL);
 #ifdef VSTATUS
        term.c_cc[VSTATUS] = _POSIX_VDISABLE;
 #endif
-       (void) term_setattr(input, &term);
+       (void) tcsetattr(input, TCSAFLUSH|TCSASOFT, &term);
     } else {
        memset(&term, 0, sizeof(term));
        memset(&oterm, 0, sizeof(oterm));
@@ -186,13 +196,16 @@ restart:
        alarm(0);
        save_errno = errno;
 
-       if (!ISSET(term.tflags, ECHO))
+       if (!ISSET(term.c_lflag, ECHO))
            (void) write(output, "\n", 1);
     }
 
     /* Restore old tty settings and signals. */
-    if (memcmp(&term, &oterm, sizeof(term)) != 0)
-       (void) term_setattr(input, &oterm);
+    if (memcmp(&term, &oterm, sizeof(term)) != 0) {
+       while (tcsetattr(input, TCSANOW|TCSASOFT, &oterm) == -1 &&
+           errno == EINTR)
+           continue;
+    }
     (void) sigaction(SIGALRM, &savealrm, NULL);
     (void) sigaction(SIGINT, &saveint, NULL);
     (void) sigaction(SIGHUP, &savehup, NULL);
index 0d55e99f169d2f3b9d650fca7a864288b016b648..4a95e867dff6f0b7edb42f1dd8402ded9ac521e5 100644 (file)
--- a/version.h
+++ b/version.h
  * 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.11 2007/11/02 19:15:16 millert Exp $
  */
 
 #ifndef _SUDO_VERSION_H
 #define _SUDO_VERSION_H
 
-static const char version[] = "1.6.9p6";
+static const char version[] = "1.6.9p8";
 
 #endif /* _SUDO_VERSION_H */
index 79b1e6006f321fe40aa468256fb7131d4a649c5f..1a0be5cd9a3e329a64b9e5438f7a76a6bc7ac326 100644 (file)
@@ -61,7 +61,7 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
 
 
 
-1.6.9p6                  October  9, 2007                       1
+1.6.9p8                 November  2, 2007                       1
 
 
 
@@ -127,7 +127,7 @@ D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
 
 
 
-1.6.9p6                  October  9, 2007                       2
+1.6.9p8                 November  2, 2007                       2
 
 
 
@@ -193,6 +193,6 @@ D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
 
 
 
-1.6.9p6                  October  9, 2007                       3
+1.6.9p8                 November  2, 2007                       3
 
 
index 6caf2e743346a0a1e4e7018352ffa79a8c2ab094..fe412a2ca987397c0aaa4943424b85848cba0ba9 100644 (file)
@@ -17,7 +17,7 @@
 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
 .\" 
-.\" $Sudo: visudo.man.in,v 1.20.2.11 2007/10/09 13:30:48 millert Exp $
+.\" $Sudo: visudo.man.in,v 1.20.2.13 2007/11/02 19:15:16 millert Exp $
 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\"
 .IX Title "VISUDO @mansectsu@"
-.TH VISUDO @mansectsu@ "October  9, 2007" "1.6.9p6" "MAINTENANCE COMMANDS"
+.TH VISUDO @mansectsu@ "November  2, 2007" "1.6.9p8" "MAINTENANCE COMMANDS"
 .SH "NAME"
 visudo \- edit the sudoers file
 .SH "SYNOPSIS"