Tue May 30 16:14:56 2017 UTC ()
sudo: update to 1.8.20p1.
Fixes CVE-2017-1000367, local privilege escalation on linux.

What's new in Sudo 1.8.20p1

 * Fixed "make check" when using OpenSSL or GNU crypt.
   Bug #787.

 * Fixed CVE-2017-1000367, a bug parsing /proc/pid/stat on Linux
   when the process name contains spaces.  Since the user has control
   over the command name, this could potentially be used by a user
   with sudo access to overwrite an arbitrary file on systems with
   SELinux enabled.  Also stop performing a breadth-first traversal
   of /dev when looking for the device; only a hard-coded list of
   directories are checked,

What's new in Sudo 1.8.20

 * Added support for SASL_MECH in ldap.conf. Bug #764

 * Added support for digest matching when the command is a glob-style
   pattern or a directory. Previously, only explicit path matches
   supported digest checks.

 * New "fdexec" Defaults option to control whether a command
   is executed by path or by open file descriptor.

 * The embedded copy of zlib has been upgraded to version 1.2.11.

 * Fixed a bug that prevented sudoers include files with a relative
   path starting with the letter 'i' from being opened.  Bug #776.

 * Added support for command timeouts in sudoers.  The command will
   be terminated if the timeout expires.

 * The SELinux role and type are now displayed in the "sudo -l"
   output for the LDAP and SSSD backends, just as they are in the
   sudoers backend.

 * A new command line option, -T, can be used to specify a command
   timeout as long as the user-specified timeout is not longer than
   the timeout specified in sudoers.  This option may only be
   used when the "user_command_timeouts" flag is enabled in sudoers.

 * Added NOTBEFORE and NOTAFTER command options to the sudoers
   backend similar to what is already available in the LDAP backend.

 * Sudo can now optionally use the SHA2 functions in OpenSSL or GNU
   crypt instead of the SHA2 implementation bundled with sudo.

 * Fixed a compilation error on systems without the stdbool.h header
   file.  Bug #778.

 * Fixed a compilation error in the standalone Kerberos V authentication
   module.  Bug #777.

 * Added the iolog_flush flag to sudoers which causes I/O log data
   to be written immediately to disk instead of being buffered.

 * I/O log files are now created with group ID 0 by default unless
   the "iolog_user" or "iolog_group" options are set in sudoers.

 * It is now possible to store I/O log files on an NFS-mounted
   file system where uid 0 is remapped to an unprivileged user.
   The "iolog_user" option must be set to a non-root user and the
   top-level I/O log directory must exist and be owned by that user.

 * Added the restricted_env_file setting to sudoers which is similar
   to env_file but its contents are subject to the same restrictions
   as variables in the invoking user's environment.

 * Fixed a use after free bug in the SSSD backend when the fqdn
   sudoOption is enabled and no hostname value is present in
   /etc/sssd/sssd.conf.

 * Fixed a typo that resulted in a compilation error on systems
   where the killpg() function is not found by configure.

 * Fixed a compilation error with the included version of zlib
   when sudo was built outside the source tree.

 * Fixed the exit value of sudo when the command is terminated by
   a signal other than SIGINT.  This was broken in sudo 1.8.15 by
   the fix for Bug #722.  Bug #784.

 * Fixed a regression introduced in sudo 1.8.18 where the "lecture"
   option could not be used in a positive boolean context, only
   a negative one.

 * Fixed an issue where sudo would consume stdin if it was not
   connected to a tty even if log_input is not enabled in sudoers.
   Bug #786.

 * Clarify in the sudoers manual that the #includedir directive
   diverts control to the files in the specified directory and,
   when parsing of those files is complete, returns control to the
   original file.  Bug #775.

What's new in Sudo 1.8.19p2

 * Fixed a crash in visudo introduced in sudo 1.8.9 when an IP address
   or network is used in a host-based Defaults entry.  Bug #766

 * Added a missing check for the ignore_iolog_errors flag when
   the sudoers plugin generates the I/O log file path name.

 * Fixed a typo in sudo's vsyslog() replacement that resulted in
   garbage being logged to syslog.

What's new in Sudo 1.8.19p1

 * Fixed a bug introduced in sudo 1.8.19 that resulted in the wrong
   syslog priority and facility being used.

What's new in Sudo 1.8.19

 * New "syslog_maxlen" Defaults option to control the maximum size of
   syslog messages generated by sudo.

 * Sudo has been run against PVS-Studio and any issues that were
   not false positives have been addressed.

 * I/O log files are now created with the same group ID as the
   parent directory and not the invoking user's group ID.

 * I/O log permissions and ownership are now configurable via the
   "iolog_mode", "iolog_user" and "iolog_group" sudoers Defaults
   variables.

 * Fixed configuration of the sudoers I/O log plugin debug subsystem.
   Previously, I/O log information was not being written to the
   sudoers debug log.

 * Fixed a bug in visudo that broke editing of files in an include
   dir that have a syntax error.  Normally, visudo does not edit
   those files, but if a syntax error is detected in one, the user
   should get a chance to fix it.

 * Warnings about unknown or unparsable sudoers Defaults entries now
   include the file and line number of the problem.

 * Visudo will now use the file and line number information about an
   unknown or unparsable Defaults entry to go directly to the file
   with the problem.

 * Fixed a bug in the sudoers LDAP back-end where a negated sudoHost
   entry would prevent other sudoHost entries following it from matching.

 * Warnings from visudo about a cycle in an Alias entry now include the
   file and line number of the problem.

 * In strict mode, visudo will now use the file and line number
   information about a cycle in an Alias entry to go directly to the
   file with the problem.

 * The sudo_noexec.so file is now linked with -ldl on systems that
   require it for the wordexp() wrapper.

 * Fixed linking of sudo_noexec.so on macOS systems where it must be
   a dynamic library and not a module.

 * Sudo's "make check" now includes a test for sudo_noexec.so
   working.

 * The sudo front-end now passes the user's umask to the plugin.
   Previously the plugin had to determine this itself.

 * Sudoreplay can now display the stdin and ttyin streams when they
   are explicitly added to the filter list.

 * Fixed a bug introduced in sudo 1.8.17 where the "all" setting
   for verifypw and listpw was not being honored.  Bug #762.

 * The syslog priority (syslog_goodpri and syslog_badpri) can now
   be negated or set to "none" to disable logging of successful or
   unsuccessful sudo attempts via syslog.

What's new in Sudo 1.8.18p1

 * When sudo_noexec.so is used, the WRDE_NOCMD flag is now added
   if the wordexp() function is called.  This prevents commands
   from being run via wordexp() without disabling it entirely.

 * On Linux systems, sudo_noexec.so now uses a seccomp filter to
   disable execute access if the kernel supports seccomp.  This is
   more robust than the traditional method of using stub functions
   that return an error.

What's new in Sudo 1.8.18

 * The sudoers locale is now set before parsing the sudoers file.
   If sudoers_locale is set in sudoers, it is applied before
   evaluating other Defaults entries.  Previously, sudoers_locale
   was used when evaluating sudoers but not during the inital parse.
   Bug #748.

 * A missing or otherwise invalid #includedir is now ignored instead
   of causing a parse error.

 * During "make install", backup files are only used on HP-UX where
   it is not possible to unlink a shared object that is in use.
   This works around a bug in ldconfig on Linux which could create
   links to the backup shared library file instead of the current
   one.

 * Fixed a bug introduced in 1.8.17 where sudoers entries with long
   commands lines could be truncated, preventing a match.  Bug #752.

 * The fqdn, runas_default and sudoers_locale Defaults settings are
   now applied before any other Defaults settings since they can
   change how other Defaults settings are parsed.

 * On systems without the O_NOFOLLOW open(2) flag, when the NOFOLLOW
   flag is set, sudoedit now checks whether the file is a symbolic link
   before opening it as well as after the open.  Bug #753.

 * Sudo will now only resolve a user's group IDs to group names
   when sudoers includes group-based permissions.  Group lookups
   can be expensive on some systems where the group database is
   not local.

 * If the file system holding the sudo log file is full, allow
   the command to run unless the new ignore_logfile_errors Defaults
   option is disabled.  Bug #751.

 * The ignore_audit_errors and ignore_iolog_errors Defaults options
   have been added to control sudo's behavior when it is unable to
   write to the audit and I/O logs.

 * Fixed a bug introduced in 1.8.17 where the SIGPIPE signal handler
   was not being restored when sudo directly executes the command.

 * Fixed a bug where "sudo -l command" would indicate that a command
   was runnable even when denied by sudoers when using the LDAP or
   SSSD backends.

 * The match_group_by_gid Defaults option has been added to allow
   sites where group name resolution is slow and where sudoers only
   contains a small number of groups to match groups by group ID
   instead of by group name.

 * Fixed a bug on Linux where a 32-bit sudo binary could fail with
   an "unable to allocate memory" error when run on a 64-bit system.
   Bug #755

 * When parsing ldap.conf, sudo will now only treat a '#' character
   as the start of a comment when it is at the beginning of the
   line.

 * Fixed a potential crash when auditing is enabled and the audit
   function fails with an error.  Bug #756

 * Norwegian Nynorsk translation for sudo from translationproject.org.

 * Fixed a typo that broke short host name matching when the fqdn
   flag is enabled in sudoers.  Bug #757

 * Negated sudoHost attributes are now supported by the LDAP and
   SSSD backends.

 * Fixed matching entries in the LDAP and SSSD backends when a
   RunAsGroup is specified but no RunAsUser is present.

 * Fixed "sudo -l" output in the LDAP and SSSD backends when a
   RunAsGroup is specified but no RunAsUser is present.


(maya)
diff -r1.153 -r1.154 pkgsrc/security/sudo/Makefile
diff -r1.88 -r1.89 pkgsrc/security/sudo/distinfo
diff -r1.33 -r1.34 pkgsrc/security/sudo/patches/patch-af
diff -r1.24 -r1.25 pkgsrc/security/sudo/patches/patch-ag
diff -r0 -r1.1 pkgsrc/security/sudo/patches/patch-include_sudo__event.h
diff -r1.1 -r1.2 pkgsrc/security/sudo/patches/patch-src_Makefile.in

cvs diff -r1.153 -r1.154 pkgsrc/security/sudo/Makefile (expand / switch to unified diff)

--- pkgsrc/security/sudo/Makefile 2017/01/19 18:52:24 1.153
+++ pkgsrc/security/sudo/Makefile 2017/05/30 16:14:56 1.154
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.153 2017/01/19 18:52:24 agc Exp $ 1# $NetBSD: Makefile,v 1.154 2017/05/30 16:14:56 maya Exp $
2 2
3DISTNAME= sudo-1.8.17p1 3DISTNAME= sudo-1.8.20p1
4CATEGORIES= security 4CATEGORIES= security
5MASTER_SITES= http://www.sudo.ws/dist/ 5MASTER_SITES= http://www.sudo.ws/dist/
6MASTER_SITES+= ftp://ftp.sudo.ws/pub/sudo/ 6MASTER_SITES+= ftp://ftp.sudo.ws/pub/sudo/
7MASTER_SITES+= ftp://ftp.uwsg.indiana.edu/pub/security/sudo/ 7MASTER_SITES+= ftp://ftp.uwsg.indiana.edu/pub/security/sudo/
8MASTER_SITES+= ftp://ftp.twaren.net/Unix/Security/Sudo/ 8MASTER_SITES+= ftp://ftp.twaren.net/Unix/Security/Sudo/
9MASTER_SITES+= http://ftp.tux.org/pub/security/sudo/ 9MASTER_SITES+= http://ftp.tux.org/pub/security/sudo/
10 10
11MAINTAINER= kim@tac.nyc.ny.us 11MAINTAINER= kim@tac.nyc.ny.us
12HOMEPAGE= http://www.sudo.ws/ 12HOMEPAGE= http://www.sudo.ws/
13COMMENT= Allow others to run commands as root 13COMMENT= Allow others to run commands as root
14LICENSE= isc AND modified-bsd 14LICENSE= isc AND modified-bsd
15 15
16USE_LIBTOOL= yes 16USE_LIBTOOL= yes

cvs diff -r1.88 -r1.89 pkgsrc/security/sudo/distinfo (expand / switch to unified diff)

--- pkgsrc/security/sudo/distinfo 2016/09/16 11:50:37 1.88
+++ pkgsrc/security/sudo/distinfo 2017/05/30 16:14:56 1.89
@@ -1,13 +1,14 @@ @@ -1,13 +1,14 @@
1$NetBSD: distinfo,v 1.88 2016/09/16 11:50:37 jperkin Exp $ 1$NetBSD: distinfo,v 1.89 2017/05/30 16:14:56 maya Exp $
2 2
3SHA1 (sudo-1.8.17p1.tar.gz) = e9bb729513cd15e99def42019c35917bc9a73536 3SHA1 (sudo-1.8.20p1.tar.gz) = 2138fca8c91c0504579aaf57fc39cee95486efd1
4RMD160 (sudo-1.8.17p1.tar.gz) = c3af867a6047c21614c4550534fa2566d6540913 4RMD160 (sudo-1.8.20p1.tar.gz) = 1dbf71b6d22e9c75f57942c026be40dc02774859
5SHA512 (sudo-1.8.17p1.tar.gz) = e9facd2d5578d4effb516931322b5f4f9578baa779cba281d36a3d0995b1fd9d085d6b141544b3dc698569fa294163bbad9f779166a05a0f18f4ad81a630b954 5SHA512 (sudo-1.8.20p1.tar.gz) = b7d4c07a550da917029e31d15e734d9462f3565ee43eb5f6fd19463b54a2fa3f444381f0999d6d1ba643b65832056dd9177dad4452fa9f87f2542c223b13f258
6Size (sudo-1.8.17p1.tar.gz) = 2786618 bytes 6Size (sudo-1.8.20p1.tar.gz) = 2930394 bytes
7SHA1 (patch-aa) = 63c89e6d4e530ab92b7452f4025fbbf2a45dad65 7SHA1 (patch-aa) = 63c89e6d4e530ab92b7452f4025fbbf2a45dad65
8SHA1 (patch-af) = 19c7cb41432404050c2452c3c53f2e4f588b3ab1 8SHA1 (patch-af) = db54ce780c174129e2a25a87f3e3a926596c68b2
9SHA1 (patch-ag) = cb03a0a7daf4b5ef203f23726ad3a335b712a718 9SHA1 (patch-ag) = b80c3051f990a9e71c169ed8dbfd187556d22dac
 10SHA1 (patch-include_sudo__event.h) = 6aaf60cfcac89267c55d8578d2bb8785a3c67e0c
10SHA1 (patch-plugins_sudoers_Makefile.in) = d8612ac7bf2f5a892d9720c4df91810ca807f4ed 11SHA1 (patch-plugins_sudoers_Makefile.in) = d8612ac7bf2f5a892d9720c4df91810ca807f4ed
11SHA1 (patch-plugins_sudoers_logging.c) = a42e54af2b6057804aecb3b6a48c565e8ac4df82 12SHA1 (patch-plugins_sudoers_logging.c) = a42e54af2b6057804aecb3b6a48c565e8ac4df82
12SHA1 (patch-src_Makefile.in) = 43f7266d3d106fca69003ee040342c3b201fd262 13SHA1 (patch-src_Makefile.in) = fc2b7ea0835d7fe3192fb12cac8ab2eac61bf132
13SHA1 (patch-src_sudo__edit.c) = ef411520ccefbd36bb4adf3329e6144e54647372 14SHA1 (patch-src_sudo__edit.c) = ef411520ccefbd36bb4adf3329e6144e54647372

cvs diff -r1.33 -r1.34 pkgsrc/security/sudo/patches/Attic/patch-af (expand / switch to unified diff)

--- pkgsrc/security/sudo/patches/Attic/patch-af 2016/09/12 17:12:24 1.33
+++ pkgsrc/security/sudo/patches/Attic/patch-af 2017/05/30 16:14:56 1.34
@@ -1,68 +1,68 @@ @@ -1,68 +1,68 @@
1$NetBSD: patch-af,v 1.33 2016/09/12 17:12:24 taca Exp $ 1$NetBSD: patch-af,v 1.34 2017/05/30 16:14:56 maya Exp $
2 2
3* Add "--with-nbsdops" option, NetBSD standard options. 3* Add "--with-nbsdops" option, NetBSD standard options.
4* Link with util(3) in the case of DragonFly, too. 4* Link with util(3) in the case of DragonFly, too.
5* When specified "--with-kerb5" option, test existence of several functions 5* When specified "--with-kerb5" option, test existence of several functions
6 even if there is krb5-config. krb5-config dosen't give all definitions for 6 even if there is krb5-config. krb5-config dosen't give all definitions for
7 functions (HAVE_KRB5_*). 7 functions (HAVE_KRB5_*).
8* Remove setting sysconfdir to "/etc". 8* Remove setting sysconfdir to "/etc".
9 9
10--- configure.ac.orig 2016-06-22 16:36:23.000000000 +0000 10--- configure.ac.orig 2016-06-22 16:36:23.000000000 +0000
11+++ configure.ac 11+++ configure.ac
12@@ -439,6 +439,20 @@ AC_ARG_WITH(csops, [AS_HELP_STRING([--wi 12@@ -447,6 +447,20 @@ AC_ARG_WITH(csops, [AS_HELP_STRING([--wi
13 ;; 13 ;;
14 esac]) 14 esac])
15  15
16++AC_ARG_WITH(nbsdops, [AS_HELP_STRING([--with-nbsdops], [add NetBSD standard opt 16+AC_ARG_WITH(nbsdops, [AS_HELP_STRING([--with-nbsdops], [add NetBSD standard opt
17+ions])], 17+ions])],
18+[case $with_nbsdops in 18+[case $with_nbsdops in
19+ yes) echo 'Adding NetBSD standard options' 19+ yes) echo 'Adding NetBSD standard options'
20+ CHECKSIA=false 20+ CHECKSIA=false
21+ with_ignore_dot=yes 21+ with_ignore_dot=yes
22+ with_env_editor=yes 22+ with_env_editor=yes
23+ with_tty_tickets=yes 23+ with_tty_tickets=yes
24+ ;; 24+ ;;
25+ no) ;; 25+ no) ;;
26+ *) echo "Ignoring unknown argument to --with-nbsdops: $with_nbsdops" 26+ *) echo "Ignoring unknown argument to --with-nbsdops: $with_nbsdops"
27+ ;; 27+ ;;
28+esac]) 28+esac])
29+ 29+
30 AC_ARG_WITH(passwd, [AS_HELP_STRING([--without-passwd], [don't use passwd/shadow file for authentication])], 30 AC_ARG_WITH(passwd, [AS_HELP_STRING([--without-passwd], [don't use passwd/shadow file for authentication])],
31 [case $with_passwd in 31 [case $with_passwd in
32 yes|no) AC_MSG_CHECKING(whether to use shadow/passwd file authentication) 32 yes|no) AC_MSG_CHECKING(whether to use shadow/passwd file authentication)
33@@ -1951,7 +1965,7 @@ case "$host" in 33@@ -1971,7 +1985,7 @@ case "$host" in
34 : ${mansectsu='1m'} 34 : ${mansectsu='1m'}
35 : ${mansectform='4'} 35 : ${mansectform='4'}
36 ;; 36 ;;
37- *-*-linux*|*-*-k*bsd*-gnu) 37- *-*-linux*|*-*-k*bsd*-gnu)
38+ *-*-linux*|*-*-k*bsd*-gnu|*-*-gnukfreebsd) 38+ *-*-linux*|*-*-k*bsd*-gnu|*-*-gnukfreebsd)
39 shadow_funcs="getspnam" 39 shadow_funcs="getspnam"
40 test -z "$with_pam" && AUTH_EXCL_DEF="PAM" 40 test -z "$with_pam" && AUTH_EXCL_DEF="PAM"
41 ;; 41 # Check for SECCOMP_SET_MODE_FILTER in linux/seccomp.h
42@@ -2299,7 +2313,7 @@ SUDO_MAILDIR 42@@ -2329,7 +2343,7 @@ SUDO_MAILDIR
43 if test ${with_logincap-'no'} != "no"; then 43 if test ${with_logincap-'no'} != "no"; then
44 AC_CHECK_HEADERS([login_cap.h], [LOGINCAP_USAGE='[[-c class]] '; LCMAN=1 44 AC_CHECK_HEADERS([login_cap.h], [LOGINCAP_USAGE='[[-c class]] '; LCMAN=1
45 case "$OS" in 45 case "$OS" in
46- freebsd|netbsd) 46- freebsd|netbsd)
47+ dragonfly*|freebsd|netbsd) 47+ dragonfly*|freebsd|netbsd)
48 SUDO_LIBS="${SUDO_LIBS} -lutil" 48 SUDO_LIBS="${SUDO_LIBS} -lutil"
49 SUDOERS_LIBS="${SUDOERS_LIBS} -lutil" 49 SUDOERS_LIBS="${SUDOERS_LIBS} -lutil"
50 ;; 50 ;;
51@@ -3381,6 +3395,8 @@ if test ${with_kerb5-'no'} != "no"; then 51@@ -3441,6 +3455,8 @@ if test ${with_kerb5-'no'} != "no"; then
52 ]) 52 ])
53 AUTH_OBJS="$AUTH_OBJS kerb5.lo" 53 AUTH_OBJS="$AUTH_OBJS kerb5.lo"
54 fi 54 fi
55+fi 55+fi
56+if test ${with_kerb5-'no'} != "no"; then 56+if test ${with_kerb5-'no'} != "no"; then
57 _LIBS="$LIBS" 57 _LIBS="$LIBS"
58 LIBS="${LIBS} ${SUDOERS_LIBS}" 58 LIBS="${LIBS} ${SUDOERS_LIBS}"
59 AC_CHECK_FUNCS([krb5_verify_user krb5_init_secure_context]) 59 AC_CHECK_FUNCS([krb5_verify_user krb5_init_secure_context])
60@@ -4220,7 +4236,7 @@ test "$datarootdir" = '${prefix}/share'  60@@ -4292,7 +4308,7 @@ test "$datarootdir" = '${prefix}/share'
61 test "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)' 61 test "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)'
62 test "$localedir" = '${datarootdir}/locale' && localedir='$(datarootdir)/locale' 62 test "$localedir" = '${datarootdir}/locale' && localedir='$(datarootdir)/locale'
63 test "$localstatedir" = '${prefix}/var' && localstatedir='$(prefix)/var' 63 test "$localstatedir" = '${prefix}/var' && localstatedir='$(prefix)/var'
64-test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' 64-test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc'
65+dnl test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' 65+dnl test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc'
66  66
67 dnl 67 dnl
68 dnl Substitute into the Makefile and man pages 68 dnl Substitute into the Makefile and man pages

cvs diff -r1.24 -r1.25 pkgsrc/security/sudo/patches/Attic/patch-ag (expand / switch to unified diff)

--- pkgsrc/security/sudo/patches/Attic/patch-ag 2016/09/12 17:12:24 1.24
+++ pkgsrc/security/sudo/patches/Attic/patch-ag 2017/05/30 16:14:56 1.25
@@ -1,87 +1,108 @@ @@ -1,87 +1,108 @@
1$NetBSD: patch-ag,v 1.24 2016/09/12 17:12:24 taca Exp $ 1$NetBSD: patch-ag,v 1.25 2017/05/30 16:14:56 maya Exp $
2 2
3* Add "--with-nbsdops" option, NetBSD standard options. 3* Add "--with-nbsdops" option, NetBSD standard options.
4* Link with util(3) in the case of DragonFly, too. 4* Link with util(3) in the case of DragonFly, too.
5* When specified "--with-kerb5" option, test existence of several functions 5* When specified "--with-kerb5" option, test existence of several functions
6 even if there is krb5-config. krb5-config dosen't give all definitions for 6 even if there is krb5-config. krb5-config dosen't give all definitions for
7 functions (HAVE_KRB5_*). 7 functions (HAVE_KRB5_*).
8* Remove setting sysconfdir to "/etc". 8* Remove setting sysconfdir to "/etc".
9 9
10--- configure.orig 2016-06-22 16:36:22.000000000 +0000 10--- configure.orig 2017-05-29 20:33:06.000000000 +0000
11+++ configure 11+++ configure
12@@ -1562,7 +1562,7 @@ Fine tuning of the installation director 12@@ -865,6 +865,7 @@ with_libpath
 13 with_libraries
 14 with_efence
 15 with_csops
 16+with_nbsdops
 17 with_passwd
 18 with_skey
 19 with_opie
 20@@ -1571,7 +1572,7 @@ Fine tuning of the installation director
13 --bindir=DIR user executables [EPREFIX/bin] 21 --bindir=DIR user executables [EPREFIX/bin]
14 --sbindir=DIR system admin executables [EPREFIX/sbin] 22 --sbindir=DIR system admin executables [EPREFIX/sbin]
15 --libexecdir=DIR program executables [EPREFIX/libexec] 23 --libexecdir=DIR program executables [EPREFIX/libexec]
16- --sysconfdir=DIR read-only single-machine data [/etc] 24- --sysconfdir=DIR read-only single-machine data [/etc]
17+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 25+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
18 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 26 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
19 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 27 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
20 --libdir=DIR object code libraries [EPREFIX/lib] 28 --libdir=DIR object code libraries [EPREFIX/lib]
21@@ -1661,6 +1661,7 @@ Optional Packages: 29@@ -1674,6 +1675,7 @@ Optional Packages:
22 --with-libraries additional libraries to link with 30 --with-libraries additional libraries to link with
23 --with-efence link with -lefence for malloc() debugging 31 --with-efence link with -lefence for malloc() debugging
24 --with-csops add CSOps standard options 32 --with-csops add CSOps standard options
25+ --with-nbsdops add NetBSD standard options 33+ --with-nbsdops add NetBSD standard opt ions
26 --without-passwd don't use passwd/shadow file for authentication 34 --without-passwd don't use passwd/shadow file for authentication
27 --with-skey[=DIR] enable S/Key support 35 --with-skey[=DIR] enable S/Key support
28 --with-opie[=DIR] enable OPIE support 36 --with-opie[=DIR] enable OPIE support
29@@ -4499,6 +4500,22 @@ $as_echo "$as_me: WARNING: Ignoring unkn 37@@ -4746,6 +4748,23 @@ fi
30 esac 
31 fi 
32  38
33+# Check whether --with-nbsdops or --without-nbsdops was given. 
34+if test "${with_nbsdops+set}" = set; then 
35+ withval="$with_nbsdops" 
36+ case $with_nbsdops in 
37+ yes) echo 'Adding NetBSD standard options' 
38+ CHECKSIA=false 
39+ with_ignore_dot=yes 
40+ with_env_editor=yes 
41+ with_tty_tickets=yes 
42+ ;; 
43+ no) ;; 
44+ *) echo "Ignoring unknown argument to --with-nbsdops: $with_nbsdops" 
45+ ;; 
46+esac 
47+fi; 
48+ 
49  39
50  40
 41+# Check whether --with-nbsdops was given.
 42+if test "${with_nbsdops+set}" = set; then :
 43+ withval=$with_nbsdops; case $with_nbsdops in
 44+ yes) echo 'Adding NetBSD standard options'
 45+ CHECKSIA=false
 46+ with_ignore_dot=yes
 47+ with_env_editor=yes
 48+ with_tty_tickets=yes
 49+ ;;
 50+ no) ;;
 51+ *) echo "Ignoring unknown argument to --with-nbsdops: $with_nbsdops"
 52+ ;;
 53+esac
 54+fi
 55+
 56+
 57+
51 # Check whether --with-passwd was given. 58 # Check whether --with-passwd was given.
52@@ -15209,7 +15226,7 @@ fi 59 if test "${with_passwd+set}" = set; then :
 60 withval=$with_passwd; case $with_passwd in
 61@@ -15770,7 +15789,7 @@ fi
53 : ${mansectsu='1m'} 62 : ${mansectsu='1m'}
54 : ${mansectform='4'} 63 : ${mansectform='4'}
55 ;; 64 ;;
56- *-*-linux*|*-*-k*bsd*-gnu) 65- *-*-linux*|*-*-k*bsd*-gnu)
57+ *-*-linux*|*-*-k*bsd*-gnu|*-*-gnukfreebsd) 66+ *-*-linux*|*-*-k*bsd*-gnu|*-*-gnukfreebsd)
58 shadow_funcs="getspnam" 67 shadow_funcs="getspnam"
59 test -z "$with_pam" && AUTH_EXCL_DEF="PAM" 68 test -z "$with_pam" && AUTH_EXCL_DEF="PAM"
60 ;; 69 # Check for SECCOMP_SET_MODE_FILTER in linux/seccomp.h
61@@ -17228,7 +17245,7 @@ if test "x$ac_cv_header_login_cap_h" = x 70@@ -17995,7 +18014,7 @@ if test "x$ac_cv_header_login_cap_h" = x
62 _ACEOF 71 _ACEOF
63 LOGINCAP_USAGE='[-c class] '; LCMAN=1 72 LOGINCAP_USAGE='[-c class] '; LCMAN=1
64 case "$OS" in 73 case "$OS" in
65- freebsd|netbsd) 74- freebsd|netbsd)
66+ dragonfly*|freebsd|netbsd) 75+ dragonfly*|freebsd|netbsd)
67 SUDO_LIBS="${SUDO_LIBS} -lutil" 76 SUDO_LIBS="${SUDO_LIBS} -lutil"
68 SUDOERS_LIBS="${SUDOERS_LIBS} -lutil" 77 SUDOERS_LIBS="${SUDOERS_LIBS} -lutil"
69 ;; 78 ;;
70@@ -21839,6 +21856,8 @@ fi 79@@ -22483,10 +22502,9 @@ if test ${with_pam-"no"} != "no"; then
 80 # Check for pam_start() in libpam first, then for pam_appl.h.
 81 #
 82 found_pam_lib=no
 83- as_ac_Lib=`$as_echo "ac_cv_lib_pam_pam_start$lt_cv_dlopen_libs" | $as_tr_sh`
 84-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
 85+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
 86 $as_echo_n "checking for pam_start in -lpam... " >&6; }
 87-if eval \${$as_ac_Lib+:} false; then :
 88+if ${ac_cv_lib_pam_pam_start+:} false; then :
 89 $as_echo_n "(cached) " >&6
 90 else
 91 ac_check_lib_save_LIBS=$LIBS
 92@@ -23256,6 +23273,8 @@ fi
71 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 93 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
72 AUTH_OBJS="$AUTH_OBJS kerb5.lo" 94 AUTH_OBJS="$AUTH_OBJS kerb5.lo"
73 fi 95 fi
74+fi 96+fi
75+if test ${with_kerb5-'no'} != "no"; then 97+if test ${with_kerb5-'no'} != "no"; then
76 _LIBS="$LIBS" 98 _LIBS="$LIBS"
77 LIBS="${LIBS} ${SUDOERS_LIBS}" 99 LIBS="${LIBS} ${SUDOERS_LIBS}"
78 for ac_func in krb5_verify_user krb5_init_secure_context 100 for ac_func in krb5_verify_user krb5_init_secure_context
79@@ -24341,7 +24360,7 @@ test "$datarootdir" = '${prefix}/share'  101@@ -26426,7 +26445,6 @@ test "$datarootdir" = '${prefix}/share'
80 test "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)' 102 test "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)'
81 test "$localedir" = '${datarootdir}/locale' && localedir='$(datarootdir)/locale' 103 test "$localedir" = '${datarootdir}/locale' && localedir='$(datarootdir)/locale'
82 test "$localstatedir" = '${prefix}/var' && localstatedir='$(prefix)/var' 104 test "$localstatedir" = '${prefix}/var' && localstatedir='$(prefix)/var'
83-test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' 105-test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc'
84+# test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' 
85  106
86 if test X"$INIT_SCRIPT" != X""; then 107 if test X"$INIT_SCRIPT" != X""; then
87 ac_config_files="$ac_config_files init.d/$INIT_SCRIPT" 108 ac_config_files="$ac_config_files init.d/$INIT_SCRIPT"

File Added: pkgsrc/security/sudo/patches/Attic/patch-include_sudo__event.h
$NetBSD: patch-include_sudo__event.h,v 1.1 2017/05/30 16:14:56 maya Exp $

Missing include, fixes build error:
error: field 'timeout' has incomplete type
struct timeval timeout; /* for SUDO_EV_TIMEOUT */

--- include/sudo_event.h.orig	2017-01-14 04:30:15.000000000 +0000
+++ include/sudo_event.h
@@ -18,6 +18,7 @@
 #define SUDO_EVENT_H
 
 #include "sudo_queue.h"
+#include <sys/time.h> /* timeval */
 
 /* Event types */
 #define SUDO_EV_TIMEOUT		0x01	/* fire after timeout */

cvs diff -r1.1 -r1.2 pkgsrc/security/sudo/patches/patch-src_Makefile.in (expand / switch to unified diff)

--- pkgsrc/security/sudo/patches/patch-src_Makefile.in 2016/01/01 17:00:49 1.1
+++ pkgsrc/security/sudo/patches/patch-src_Makefile.in 2017/05/30 16:14:56 1.2
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1$NetBSD: patch-src_Makefile.in,v 1.1 2016/01/01 17:00:49 spz Exp $ 1$NetBSD: patch-src_Makefile.in,v 1.2 2017/05/30 16:14:56 maya Exp $
2 2
3* install the suid sudo without write-bits 3* install the suid sudo without write-bits
4 4
5--- ./src/Makefile.in.orig 2015-10-31 23:35:25.000000000 +0000 5--- ./src/Makefile.in.orig 2015-10-31 23:35:25.000000000 +0000
6+++ ./src/Makefile.in 6+++ ./src/Makefile.in
7@@ -173,7 +174,7 @@ install-rc: install-dirs 7@@ -198,7 +198,7 @@ install-rc: install-dirs
8 fi 8 fi
9  9
10 install-binaries: install-dirs $(PROGS) 10 install-binaries: install-dirs $(PROGS)
11- INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 04755 sudo $(DESTDIR)$(bindir)/sudo 11- INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 04755 sudo $(DESTDIR)$(bindir)/sudo
12+ INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 04555 sudo $(DESTDIR)$(bindir)/sudo 12+ INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 04555 sudo $(DESTDIR)$(bindir)/sudo
13 rm -f $(DESTDIR)$(bindir)/sudoedit 13 rm -f $(DESTDIR)$(bindir)/sudoedit
14 ln -s sudo $(DESTDIR)$(bindir)/sudoedit 14 ln -s sudo $(DESTDIR)$(bindir)/sudoedit
15 if [ -f sesh ]; then \ 15 if [ -f sesh ]; then \