This patch will upgrade Sudo version 1.7.10 patchlevel 2 to Sudo version 1.7.10 patchlevel 3. To apply: $ cd sudo-1.7.10p2 $ patch -p1 < sudo-1.7.10p3.patch diff -urNa sudo-1.7.10p2/ChangeLog sudo-1.7.10p3/ChangeLog --- sudo-1.7.10p2/ChangeLog Sun Sep 16 21:08:56 2012 +++ sudo-1.7.10p3/ChangeLog Wed Sep 19 14:38:23 2012 @@ -1,8 +1,41 @@ +2012-09-19 Todd C. Miller + + * .hgtags: + Added tag SUDO_1_7_10p3 for changeset 235ca8006055 + [c6964a733681] [tip] <1.7> + + * sudoreplay.c: + Use 1/0 not TRUE/FALSE. + [235ca8006055] [SUDO_1_7_10p3] <1.7> + +2012-09-18 Todd C. Miller + + * NEWS, configure, configure.in: + sudo 1.7.10p3 + [0b504b3b849a] <1.7> + + * sudoreplay.c: + Avoid calling fclose(NULL) in the error path when we cannot open an + I/O log file. + [1e1b8ec3a2d2] <1.7> + +2012-09-17 Todd C. Miller + + * fixman.sh: + Don't use embedded newline when matching, use \n. This got expanded + at some point. Bug #573 + [6a3520c3ff11] <1.7> + + * sudoreplay.c: + Fall back on lstat(2) if d_type in struct dirent is DT_UNKNOWN. Not + all file systems support d_type. Bug #572 + [8a1e160265cf] <1.7> + 2012-09-16 Todd C. Miller * .hgtags: Added tag SUDO_1_7_10p2 for changeset 60d2336634f5 - [aff26f9023cc] [tip] <1.7> + [aff26f9023cc] <1.7> * NEWS, configure, configure.in: Sudo 1.7.10p2 diff -urNa sudo-1.7.10p2/NEWS sudo-1.7.10p3/NEWS --- sudo-1.7.10p2/NEWS Sun Sep 16 21:06:24 2012 +++ sudo-1.7.10p3/NEWS Tue Sep 18 10:02:50 2012 @@ -1,3 +1,11 @@ +What's new in Sudo 1.7.10p3? + + * Fixed post-processing of the man pages on systems with legacy + versions of sed. + + * Fixed "sudoreplay -l" on Linux systems with file systems that + set DT_UNKNOWN in the d_type field of struct dirent. + What's new in Sudo 1.7.10p2? * Fixed suspending a command after it has already been resumed diff -urNa sudo-1.7.10p2/configure sudo-1.7.10p3/configure --- sudo-1.7.10p2/configure Sun Sep 16 21:06:45 2012 +++ sudo-1.7.10p3/configure Tue Sep 18 10:03:13 2012 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for sudo 1.7.10p2. +# Generated by GNU Autoconf 2.68 for sudo 1.7.10p3. # # Report bugs to . # @@ -570,8 +570,8 @@ # Identity of this package. PACKAGE_NAME='sudo' PACKAGE_TARNAME='sudo' -PACKAGE_VERSION='1.7.10p2' -PACKAGE_STRING='sudo 1.7.10p2' +PACKAGE_VERSION='1.7.10p3' +PACKAGE_STRING='sudo 1.7.10p3' PACKAGE_BUGREPORT='http://www.sudo.ws/bugs/' PACKAGE_URL='' @@ -1445,7 +1445,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sudo 1.7.10p2 to adapt to many kinds of systems. +\`configure' configures sudo 1.7.10p3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1510,7 +1510,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sudo 1.7.10p2:";; + short | recursive ) echo "Configuration of sudo 1.7.10p3:";; esac cat <<\_ACEOF @@ -1735,7 +1735,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sudo configure 1.7.10p2 +sudo configure 1.7.10p3 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2439,7 +2439,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sudo $as_me 1.7.10p2, which was +It was created by sudo $as_me 1.7.10p3, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -20747,7 +20747,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sudo $as_me 1.7.10p2, which was +This file was extended by sudo $as_me 1.7.10p3, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20813,7 +20813,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sudo config.status 1.7.10p2 +sudo config.status 1.7.10p3 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff -urNa sudo-1.7.10p2/configure.in sudo-1.7.10p3/configure.in --- sudo-1.7.10p2/configure.in Sun Sep 16 21:06:27 2012 +++ sudo-1.7.10p3/configure.in Tue Sep 18 10:02:55 2012 @@ -3,7 +3,7 @@ dnl dnl Copyright (c) 1994-1996,1998-2012 Todd C. Miller dnl -AC_INIT([sudo], [1.7.10p2], [http://www.sudo.ws/bugs/], [sudo]) +AC_INIT([sudo], [1.7.10p3], [http://www.sudo.ws/bugs/], [sudo]) AC_CONFIG_HEADER(config.h pathnames.h zlib/zconf.h) dnl dnl Note: this must come after AC_INIT diff -urNa sudo-1.7.10p2/fixman.sh sudo-1.7.10p3/fixman.sh --- sudo-1.7.10p2/fixman.sh Tue Aug 21 12:59:48 2012 +++ sudo-1.7.10p3/fixman.sh Tue Sep 18 10:00:09 2012 @@ -20,8 +20,7 @@ cat >>"$OUTFILE" <<-'EOF' /^\\fR0\\fR$/ { N - s/^\\fR0\\fR\ - minutes\.$/unlimited./ + s/^\\fR0\\fR\nminutes\.$/unlimited./ } EOF diff -urNa sudo-1.7.10p2/sudoreplay.c sudo-1.7.10p3/sudoreplay.c --- sudo-1.7.10p2/sudoreplay.c Wed May 30 10:46:41 2012 +++ sudo-1.7.10p3/sudoreplay.c Wed Sep 19 14:35:39 2012 @@ -867,7 +867,8 @@ return li; bad: - fclose(fp); + if (fp != NULL) + fclose(fp); efree(buf); free_log_info(li); return NULL; @@ -958,6 +959,11 @@ struct stat sb; size_t sdlen, sessions_len = 0, sessions_size = 36*36; int i, len; +#ifdef HAVE_STRUCT_DIRENT_D_TYPE + int checked_type = 1; +#else + const int checked_type = 0; +#endif char pathbuf[PATH_MAX], **sessions = NULL; d = opendir(dir); @@ -981,8 +987,14 @@ (dp->d_name[1] == '.' && dp->d_name[2] == '\0'))) continue; #ifdef HAVE_STRUCT_DIRENT_D_TYPE - if (dp->d_type != DT_DIR) - continue; + if (checked_type) { + if (dp->d_type != DT_DIR) { + /* Not all file systems support d_type. */ + if (dp->d_type != DT_UNKNOWN) + continue; + checked_type = 0; + } + } #endif /* Add name to session list. */ @@ -1011,9 +1023,7 @@ } else { /* Strip off "/log" and recurse if a dir. */ pathbuf[sdlen + len - 4] = '\0'; -#ifndef HAVE_STRUCT_DIRENT_D_TYPE - if (lstat(pathbuf, &sb) == 0 && S_ISDIR(sb.st_mode)) -#endif + if (checked_type || (lstat(pathbuf, &sb) == 0 && S_ISDIR(sb.st_mode))) find_sessions(pathbuf, re, user, tty); } }