head 1.12; access; symbols pkgsrc-2026Q1:1.12.0.10 pkgsrc-2026Q1-base:1.12 pkgsrc-2025Q4:1.12.0.8 pkgsrc-2025Q4-base:1.12 pkgsrc-2025Q3:1.12.0.6 pkgsrc-2025Q3-base:1.12 pkgsrc-2025Q2:1.12.0.4 pkgsrc-2025Q2-base:1.12 pkgsrc-2025Q1:1.12.0.2 pkgsrc-2025Q1-base:1.12 pkgsrc-2024Q4:1.11.0.12 pkgsrc-2024Q4-base:1.11 pkgsrc-2024Q3:1.11.0.10 pkgsrc-2024Q3-base:1.11 pkgsrc-2024Q2:1.11.0.8 pkgsrc-2024Q2-base:1.11 pkgsrc-2024Q1:1.11.0.6 pkgsrc-2024Q1-base:1.11 pkgsrc-2023Q4:1.11.0.4 pkgsrc-2023Q4-base:1.11 pkgsrc-2023Q3:1.11.0.2 pkgsrc-2023Q3-base:1.11 pkgsrc-2023Q2:1.10.0.4 pkgsrc-2023Q2-base:1.10 pkgsrc-2023Q1:1.10.0.2 pkgsrc-2023Q1-base:1.10 pkgsrc-2022Q4:1.9.0.4 pkgsrc-2022Q4-base:1.9 pkgsrc-2022Q3:1.9.0.2 pkgsrc-2022Q3-base:1.9 pkgsrc-2022Q2:1.8.0.2 pkgsrc-2022Q2-base:1.8 pkgsrc-2022Q1:1.7.0.8 pkgsrc-2022Q1-base:1.7 pkgsrc-2021Q4:1.7.0.6 pkgsrc-2021Q4-base:1.7 pkgsrc-2021Q3:1.7.0.4 pkgsrc-2021Q3-base:1.7 pkgsrc-2021Q2:1.7.0.2 pkgsrc-2021Q2-base:1.7 pkgsrc-2021Q1:1.6.0.2 pkgsrc-2021Q1-base:1.6 pkgsrc-2020Q4:1.3.0.4 pkgsrc-2020Q4-base:1.3 pkgsrc-2020Q3:1.3.0.2 pkgsrc-2020Q3-base:1.3 pkgsrc-2020Q2:1.2.0.4 pkgsrc-2020Q2-base:1.2 pkgsrc-2020Q1:1.2.0.2 pkgsrc-2020Q1-base:1.2 pkgsrc-2019Q4:1.1.0.14 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.10 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.8 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.6 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.4 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.2 pkgsrc-2018Q3-base:1.1; locks; strict; comment @# @; 1.12 date 2025.03.03.21.51.40; author nia; state Exp; branches; next 1.11; commitid zYjax0q7DeoZyFLF; 1.11 date 2023.08.13.14.14.37; author taca; state Exp; branches; next 1.10; commitid hIg5mNZSUvVaiDAE; 1.10 date 2023.02.20.13.36.42; author taca; state Exp; branches; next 1.9; commitid Jjlfjod4UQSNFgeE; 1.9 date 2022.07.05.11.01.38; author adam; state Exp; branches; next 1.8; commitid GNx2CTve26XZcHKD; 1.8 date 2022.05.14.05.41.00; author adam; state Exp; branches; next 1.7; commitid 5KOI9I8ncroj6ZDD; 1.7 date 2021.05.27.05.40.45; author adam; state Exp; branches; next 1.6; commitid mroVIU7LpyjXpKUC; 1.6 date 2021.03.18.08.57.48; author adam; state Exp; branches; next 1.5; commitid owylZ4ECWyPVKLLC; 1.5 date 2021.01.30.11.06.45; author spz; state Exp; branches; next 1.4; commitid 36Pnv9te6ycZYJFC; 1.4 date 2021.01.18.14.32.24; author taca; state Exp; branches; next 1.3; commitid MzSY3yDZ1mfDvdEC; 1.3 date 2020.09.19.14.04.29; author taca; state Exp; branches 1.3.4.1; next 1.2; commitid MM3OFtPwcZL5fFoC; 1.2 date 2019.12.28.20.43.56; author kim; state Exp; branches; next 1.1; commitid vDIwczuA7UM90wQB; 1.1 date 2018.08.14.13.18.38; author adam; state Exp; branches 1.1.14.1; next ; commitid QfXOoS0gE3fUD5OA; 1.3.4.1 date 2021.01.28.08.09.40; author bsiegert; state Exp; branches; next 1.3.4.2; commitid LWkq0Z0QjPhr4tFC; 1.3.4.2 date 2021.02.04.15.22.21; author bsiegert; state Exp; branches; next ; commitid fpYDdGHWlvrVepGC; 1.1.14.1 date 2020.02.09.19.21.38; author bsiegert; state Exp; branches; next ; commitid YIlNVNhR6w1sa2WB; desc @@ 1.12 log @sudo: Build fixes for SunOS and OpenBSD. Found via drecklypkg CI. @ text @$NetBSD: patch-configure,v 1.11 2023/08/13 14:14:37 taca Exp $ * Add "--with-nbsdops" option, NetBSD standard options. * When specified "--with-kerb5" option, test existence of several functions even if there is krb5-config. krb5-config dosen't give all definitions for functions (HAVE_KRB5_*). * Remove setting sysconfdir to "/etc". * Do not create links to localedir on SunOS. --- configure.orig 2024-11-25 15:34:25.000000000 +0000 +++ configure @@@@ -942,6 +942,7 @@@@ with_incpath with_libpath with_libraries with_csops +with_nbsdops with_passwd with_skey with_opie @@@@ -1682,7 +1683,7 @@@@ Fine tuning of the installation director --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] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] @@@@ -1812,6 +1813,7 @@@@ Optional Packages: --with-libpath additional places to look for libraries --with-libraries additional libraries to link with --with-csops add CSOps standard options + --with-nbsdops add NetBSD standard options --without-passwd don't use passwd/shadow file for authentication --with-skey[=DIR] enable S/Key support --with-opie[=DIR] enable OPIE support @@@@ -5321,6 +5323,23 @@@@ fi +# Check whether --with-nbsdops was given. +if test "${with_nbsdops+set}" = set; then : + withval=$with_nbsdops; case $with_nbsdops in + yes) echo 'Adding NetBSD standard options' + CHECKSIA=false + with_ignore_dot=yes + with_env_editor=yes + with_tty_tickets=yes + ;; + no) ;; + *) echo "Ignoring unknown argument to --with-nbsdops: $with_nbsdops" + ;; +esac +fi + + + # Check whether --with-passwd was given. if test ${with_passwd+y} then : @@@@ -18312,7 +18331,7 @@@@ fi : ${mansectform='4'} : ${mansectmisc='5'} ;; - *-*-linux*|*-*-k*bsd*-gnu) + *-*-linux*|*-*-k*bsd*-gnu|*-*-gnukfreebsd) shadow_funcs="getspnam" test -z "$with_pam" && AUTH_EXCL_DEF="PAM" # Check for SECCOMP_MODE_FILTER in linux/seccomp.h @@@@ -28316,10 +28335,6 @@@@ fi if test "$sudo_cv_gettext" = "yes"; then SUDO_NLS=enabled - # For Solaris we need links from lang to lang.UTF-8 in localedir - case "$host_os" in - solaris2*) LOCALEDIR_SUFFIX=".UTF-8";; - esac elif test "$sudo_cv_gettext_lintl" = "yes"; then SUDO_NLS=enabled LIBINTL="-lintl" @@@@ -30049,6 +30064,8 @@@@ rm -f core conftest.err conftest.$ac_obj ;; esac fi +fi +if test ${with_kerb5-'no'} != "no"; then _LIBS="$LIBS" LIBS="${LIBS} ${SUDOERS_LIBS}" ac_fn_c_check_func "$LINENO" "krb5_verify_user" "ac_cv_func_krb5_verify_user" @@@@ -36021,7 +36038,6 @@@@ test X"$localedir" = X'${datarootdir}/lo test X"$localstatedir" = X'${prefix}/var' && localstatedir='$(prefix)/var' test X"$runstatedir" = X'${localstatedir}/run' && runstatedir='$(localstatedir)/run' test X"$adminconfdir" = X'${prefix}/etc' && adminconfdir='$(prefix)/etc' -test X"$sysconfdir" = X'${prefix}/etc' && sysconfdir='/etc' # The configuration file search path is to check adminconfdir first and # fall back to sysconfdir. This can support systems with read-only @ 1.11 log @security/sudo: update to 1.9.14p3 What's new in Sudo 1.9.14p3 * Fixed a crash with Python 3.12 when the sudo Python python is unloaded. This only affects "make check" for the Python plugin. * Adapted the sudo Python plugin test output to match Python 3.12. What's new in Sudo 1.9.14p2 * Fixed a crash on Linux systems introduced in version 1.9.14 when running a command with a NULL argv[0] if "log_subcmds" or "intercept" is enabled in sudoers. * Fixed a problem with "stair-stepped" output when piping or redirecting the output of a sudo command that takes user input. * Fixed a bug introduced in sudo 1.9.14 that affects matching sudoers rules containing a Runas_Spec with an empty Runas user. These rules should only match when sudo's -g option is used but were matching even without the -g option. GitHub issue #290. What's new in Sudo 1.9.14p1 * Fixed an invalid free bug in sudo_logsrvd that was introduced in version 1.9.14 which could cause sudo_logsrvd to crash. * The sudoers plugin no longer tries to send the terminal name to the log server when no terminal is present. This bug was introduced in version 1.9.14. What's new in Sudo 1.9.14 * Fixed a bug where if the "intercept" or "log_subcmds" sudoers option was enabled and a sub-command was run where the first entry of the argument vector didn't match the command being run. This resulted in commands like "sudo su -" being killed due to the mismatch. Bug #1050. * The sudoers plugin now canonicalizes command path names before matching (where possible). This fixes a bug where sudo could execute the wrong path if there are multiple symbolic links with the same target and the same base name in sudoers that a user is allowed to run. GitHub issue #228. * Improved command matching when a chroot is specified in sudoers. The sudoers plugin will now change the root directory id needed before performing command matching. Previously, the root directory was simply prepended to the path that was being processed. * When NETGROUP_BASE is set in the ldap.conf file, sudo will now perform its own netgroup lookups of the host name instead of using the system innetgr(3) function. This guarantees that user and host netgroup lookups are performed using the same LDAP server (or servers). * Fixed a bug introduced in sudo 1.9.13 that resulted in a missing " ; " separator between environment variables and the command in log entries. * The visudo utility now displays a warning when it ignores a file in an include dir such as /etc/sudoers.d. * When running a command in a pseudo-terminal, sudo will initialize the terminal settings even if it is the background process. Previously, sudo only initialized the pseudo-terminal when running in the foreground. This fixes an issue where a program that checks the window size would read the wrong value when sudo was running in the background. * Fixed a bug where only the first two digits of the TSID field being was logged. Bug #1046. * The "use_pty" sudoers option is now enabled by default. To restore the historic behavior where a command is run in the user's terminal, add "Defaults !use_pty" to the sudoers file. GitHub issue #258. * Sudo's "-b" option now works when the command is run in a pseudo-terminal. * When disabling core dumps, sudo now only modifies the soft limit and leaves the hard limit as-is. This avoids problems on Linux when sudo does not have CAP_SYS_RESOURCE, which may be the case when run inside a container. GitHub issue #42. * Sudo configuration file paths have been converted to colon-separated lists of paths. This makes it possible to have configuration files on a read-only file system while still allowing for local modifications in a different (writable) directory. The new --enable-adminconf configure option can be used to specify a directory that is searched for configuration files in preference to the sysconfdir (which is usually /etc). * The "intercept_verify" sudoers option is now only applied when the "intercept" option is set in sudoers. Previously, it was also applied when "log_subcmds" was enabled. * The NETGROUP_QUERY ldap.conf parameter can now be disabled for LDAP servers that do not support querying the nisNetgroup object by its nisNetgroupTriple attribute, while still allowing sudo to query the LDAP server directly to determine netgroup membership. * Fixed a long-standing bug where a sudoers rule without an explicit runas list allowed the user to run a command as root and any group instead of just one of the groups that root is a member of. For example, a rule such as "myuser ALL = ALL" would permit "sudo -u root -g othergroup" even if root did not belong to "othergroup". * Fixed a bug where a sudoers rule with an explicit runas list allowed a user to run sudo commands as themselves. For example, a rule such as "myuser ALL = (root) ALL", "myuser" should only allow commands to be run as root (optionally using one of root's groups). However, the rule also allowed the user to run "sudo -u myuser -g myuser command". * Fixed a bug that prevented the user from specifying a group on the command line via "sudo -g" if the rule's Runas_Spec contained a Runas_Alias. * Sudo now requires a C compiler that conforms to ISO C99 or higher to build. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.10 2023/02/20 13:36:42 taca Exp $ d8 1 d10 1 a10 1 --- configure.orig 2023-07-24 20:25:13.000000000 +0000 d12 1 a12 1 @@@@ -937,6 +937,7 @@@@ with_incpath d20 1 a20 1 @@@@ -1676,7 +1677,7 @@@@ Fine tuning of the installation director d29 1 a29 1 @@@@ -1808,6 +1809,7 @@@@ Optional Packages: d37 1 a37 1 @@@@ -5329,6 +5331,23 @@@@ fi d61 1 a61 1 @@@@ -18263,7 +18282,7 @@@@ fi d70 12 a81 1 @@@@ -29669,6 +29688,8 @@@@ rm -f core conftest.err conftest.$ac_obj d90 1 a90 1 @@@@ -35634,7 +35655,6 @@@@ test X"$localedir" = X'${datarootdir}/lo @ 1.10 log @security/sudo: update to 1.9.13p1 pkgsrc change: avoid use empty in options.mk. What's new in Sudo 1.9.13 (2023-02-14) * Fixed a bug running relative commands via sudo when "log_subcmds" is enabled. GitHub issue #194. * Fixed a signal handling bug when running sudo commands in a shell script. Signals were not being forwarded to the command when the sudo process was not run in its own process group. * Fixed a bug in cvtsudoers' LDIF parsing when the file ends without a newline and a backslash is the last character of the file. * Fixed a potential use-after-free bug with cvtsudoers filtering. GitHub issue #198. * Added a reminder to the default lecture that the password will not echo. This line is only displayed when the pwfeedback option is disabled. GitHub issue #195. * Fixed potential memory leaks in error paths. GitHub issues #199, #202. * Fixed potential NULL dereferences on memory allocation failure. GitHub issues #204, #211. * Sudo now uses C23-style attributes in function prototypes instead of gcc-style attributes if supported. * Added a new "list" pseudo-command in sudoers to allow a user to list another user's privileges. Previously, only root or a user with the ability to run any command as either root or the target user on the current host could use the -U option. This also includes a fix to the log entry when a user lacks permission to run "sudo -U otheruser -l command". Previously, the logs would indicate that the user tried to run the actual command, now the log entry includes the list operation. * JSON logging now escapes control characters if they happen to appear in the command or environment. * New Albanian translation from translationproject.org. * Regular expressions in sudoers or logsrvd.conf may no longer contain consecutive repetition operators. This is implementation- specific behavior according to POSIX, but some implementations will allocate excessive amounts of memory. This mainly affects the fuzzers. * Sudo now builds AIX-style shared libraries and dynamic shared objects by default instead of svr4-style. This means that the default sudo plugins are now .a (archive) files that contain a .so shared object file instead of bare .so files. This was done to improve compatibility with the AIX Freeware ecosystem, specifically, the AIX Freeware build of OpenSSL. Sudo will still load svr4-style .so plugins and if a .so file is requested, either via sudo.conf or the sudoers file, and only the .a file is present, sudo will convert the path from plugin.so to plugin.a(plugin.so) when loading it. This ensures compatibility with existing configurations. To restore the old, pre-1.9.13 behavior, run configure using the --with-aix-soname=svr4 option. * Sudo no longer checks the ownership and mode of the plugins that it loads. Plugins are configured via either the sudo.conf or sudoers file which are trusted configuration files. These checks suffered from time-of-check vs. time-of-use race conditions and complicate loading plugins that are not simple paths. Ownership and mode checks are still performed when loading the sudo.conf and sudoers files, which do not suffer from race conditions. The sudo.conf "developer_mode" setting is no longer used. * Control characters in sudo log messages and "sudoreplay -l" output are now escaped in octal format. Space characters in the command path are also escaped. Command line arguments that contain spaces are surrounded by single quotes and any literal single quote or backslash characters are escaped with a backslash. This makes it possible to distinguish multiple command line arguments from a single argument that contains spaces. * Improved support for DragonFly BSD which uses a different struct procinfo than either FreeBSD or 4.4BSD. * Fixed a compilation error on Linux arm systems running older kernels that may not define EM_ARM in linux/elf-em.h. GitHub issue #232. * Fixed a compilation error when LDFLAGS contains -Wl,--no-undefined. Sudo will now link using -Wl,--no-undefined by default if possible. GitHub issue #234. * Fixed a bug executing a command with a very long argument vector when "log_subcmds" or "intercept" is enabled on a system where "intercept_type" is set to "trace". GitHub issue #194. * When sudo is configured to run a command in a pseudo-terminal but the standard input is not connected to a terminal, the command will now be run as a background process. This works around a problem running sudo commands in the background from a shell script where changing the terminal to raw mode could interfere with the interactive shell that ran the script. GitHub issue #237. * A missing include file in sudoers is no longer a fatal error unless the error_recovery plugin argument has been set to false. What's new in Sudo 1.9.13p1 (2023-02-17) * Fixed a typo in the configure script that resulted in a line like "]: command not found" in the output. GitHub issue #238. * Corrected the order of the C23 [[noreturn]] attribute in function prototypes. This fixes a build error with GCC 13. GitHub issue #239. * The "check" make target misbehaved when there was more than one version of the UTF-8 C locale in the output of "locale -a". GitHub issue #241. * Removed a dependency on the AC_SYS_YEAR2038 macro in configure.ac. This was added in autoconf 2.72 but sudo's configure.ac only required autoconf 2.70. * Relaxed the autoconf version requirement to version 2.69. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.9 2022/07/05 11:01:38 adam Exp $ d9 1 a9 1 --- configure.orig 2023-02-16 18:43:30.000000000 +0000 d11 1 a11 1 @@@@ -935,6 +935,7 @@@@ with_incpath d19 1 a19 1 @@@@ -1673,7 +1674,7 @@@@ Fine tuning of the installation director d28 1 a28 1 @@@@ -1802,6 +1803,7 @@@@ Optional Packages: d36 1 a36 1 @@@@ -5290,6 +5292,23 @@@@ fi d60 1 a60 1 @@@@ -18196,7 +18215,7 @@@@ fi d69 1 a69 1 @@@@ -29486,6 +29505,8 @@@@ rm -f core conftest.err conftest.$ac_obj d78 5 a82 5 @@@@ -35492,7 +35513,6 @@@@ test "$docdir" = '${datarootdir}/doc/${P test "$localedir" = '${datarootdir}/locale' && localedir='$(datarootdir)/locale' test "$localstatedir" = '${prefix}/var' && localstatedir='$(prefix)/var' test "$runstatedir" = '${localstatedir}/run' && runstatedir='$(localstatedir)/run' -test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' d84 2 a85 2 if test X"$INIT_SCRIPT" != X"" then : @ 1.9 log @sudo: updated to 1.9.11p3 What's new in Sudo 1.9.11p3 * Fixed "connection reset" errors on AIX when running shell scripts with the "intercept" or "log_subcmds" sudoers options enabled. * Fixed very slow execution of shell scripts when the "intercept" or "log_subcmds" sudoers options are set on systems that enable Nagle's algorithm on the loopback device, such as AIX. What's new in Sudo 1.9.11p2 * Fixed a compilation error on Linux/x86_64 with the x32 ABI. * Fixed a regression introduced in 1.9.11p1 that caused a warning when logging to sudo_logsrvd if the command returned no output. What's new in Sudo 1.9.11p1 * Correctly handle EAGAIN in the I/O read/right events. This fixes a hang seen on some systems when piping a large amount of data through sudo, such as via rsync. * Changes to avoid implementation or unspecified behavior when bit shifting signed values in the protobuf library. * Fixed a compilation error on Linux/aarch64. * Fixed the configure check for seccomp(2) support on Linux. * Corrected the EBNF specification for tags in the sudoers manual page. What's new in Sudo 1.9.11 * Fixed a crash in the Python module with Python 3.9.10 on some systems. Additionally, "make check" now passes for Python 3.9.10. * Error messages sent via email now include more details, including the file name and the line number and column of the error. Multiple errors are sent in a single message. Previously, only the first error was included. * Fixed logging of parse errors in JSON format. Previously, the JSON logger would not write entries unless the command and runuser were set. These may not be known at the time a parse error is encountered. * Fixed a potential crash parsing sudoers lines larger than twice the value of LINE_MAX on systems that lack the getdelim() function. * The tests run by "make check" now unset the LANGUAGE environment variable. Otherwise, localization strings will not match if LANGUAGE is set to a non-English locale. * The "starttime" test now passed when run under Debian faketime. * The Kerberos authentication module now honors the custom password prompt if one has been specified. * The embedded copy of zlib has been updated to version 1.2.12. * Updated the version of libtool used by sudo to version 2.4.7. * Sudo now defines _TIME_BITS to 64 on systems that define __TIMESIZE in the header files (currently only GNU libc). This is required to allow the use of 64-bit time values on some 32-bit systems. * Sudo's "intercept" and "log_subcmds" options no longer force the command to run in its own pseudo-terminal. It is now also possible to intercept the system(3) function. * Fixed a bug in sudo_logsrvd when run in store-first relay mode where the commit point messages sent by the server were incorrect if the command was suspended or received a window size change event. * Fixed a potential crash in sudo_logsrvd when the "tls_dhparams" configuration setting was used. * The "intercept" and "log_subcmds" functionality can now use ptrace(2) on Linux systems that support seccomp(2) filtering. This has the advantage of working for both static and dynamic binaries and can work with sudo's SELinux RBAC mode. The following architectures are currently supported: i386, x86_64, aarch64, arm, mips (log_subcmds only), powerpc, riscv, and s390x. The default is to use ptrace(2) where possible; the new "intercept_type" sudoers setting can be used to explicitly set the type. * New Georgian translation from translationproject.org. * Fixed creating packages on CentOS Stream. * Fixed a bug in the intercept and log_subcmds support where the execve(2) wrapper was using the current environment instead of the passed environment pointer. * Added AppArmor integration for Linux. A sudoers rule can now specify an APPARMOR_PROFILE option to run a command confined by the named AppArmor profile. * Fixed parsing of the "server_log" setting in sudo_logsrvd.conf. Non-paths were being treated as paths and an actual path was treated as an error. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.8 2022/05/14 05:41:00 adam Exp $ a3 1 * Link with util(3) in the case of DragonFly, too. d9 1 a9 1 --- configure.orig 2022-06-20 22:58:38.000000000 +0000 d11 1 a11 1 @@@@ -940,6 +940,7 @@@@ with_incpath d19 1 a19 1 @@@@ -1677,7 +1678,7 @@@@ Fine tuning of the installation director d28 1 a28 1 @@@@ -1805,6 +1806,7 @@@@ Optional Packages: d36 1 a36 1 @@@@ -5230,6 +5232,23 @@@@ fi d60 1 a60 1 @@@@ -17818,7 +17837,7 @@@@ fi d69 4 a72 13 @@@@ -19760,7 +19779,7 @@@@ then : LOGINCAP_USAGE='[-c class] '; LCMAN=1 with_logincap=yes case "$OS" in - freebsd*|netbsd*) + dragonfly*|freebsd*|netbsd*) SUDO_LIBS="${SUDO_LIBS} -lutil" SUDOERS_LIBS="${SUDOERS_LIBS} -lutil" ;; @@@@ -27964,6 +27983,8 @@@@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext AUTH_OBJS="$AUTH_OBJS kerb5.lo" fi d78 1 a78 1 @@@@ -32536,7 +32557,6 @@@@ test "$docdir" = '${datarootdir}/doc/${P d84 2 a85 2 if test X"$INIT_SCRIPT" != X""; then ac_config_files="$ac_config_files etc/init.d/$INIT_SCRIPT" @ 1.8 log @sudo: updated to 1.9.10 What's new in Sudo 1.9.10 * Added new "log_passwords" and "passprompt_regex" sudoers options. If "log_passwords" is disabled, sudo will attempt to prevent passwords from being logged. If sudo detects any of the regular expressions in the "passprompt_regex" list in the terminal output, sudo will log '*' characters instead of the terminal input until a newline or carriage return is found in the input or an output character is received. * Added new "log_passwords" and "passprompt_regex" settings to sudo_logsrvd that operate like the sudoers options when logging terminal input. * Fixed several few bugs in the cvtsudoers utility when merging multiple sudoers sources. * Fixed a bug in sudo_logsrvd when parsing the sudo_logsrvd.conf file, where the "retry_interval" in the [relay] section was not being recognized. * Restored the pre-1.9.9 behavior of not performing authentication when sudo's -n option is specified. A new "noninteractive_auth" sudoers option has been added to enable PAM authentication in non-interactive mode. * On systems with /proc, if the /proc/self/stat (Linux) or /proc/pid/psinfo (other systems) file is missing or invalid, sudo will now check file descriptors 0-2 to determine the user's terminal. * Fixed a compilation problem on Debian kFreeBSD. * Fixed a crash in sudo_logsrvd when running in relay mode if an alert message is received. * Fixed an issue that resulting in "problem with defaults entries" email to be sent if a user ran sudo when the sudoers entry in the nsswitch.conf file includes "sss" but no sudo provider is configured in /etc/sssd/sssd.conf. * Updated the warning displayed when the invoking user is not allowed to run sudo. If sudo has been configured to send mail on failed attempts (see the mail_* flags in sudoers), it will now print "This incident has been reported to the administrator." If the "mailto" or "mailerpath" sudoers settings are disabled, the message will not be printed and no mail will be sent. * Fixed a bug where the user-specified command timeout was not being honored if the sudoers rule did not also specify a timeout. * Added support for using POSIX extended regular expressions in sudoers rules. A command and/or arguments in sudoers are treated as a regular expression if they start with a '^' character and end with a '$'. The command and arguments are matched separately, either one (or both) may be a regular expression. * A user may now only run "sudo -U otheruser -l" if they have a "sudo ALL" privilege where the RunAs user contains either "root" or "otheruser". Previously, having "sudo ALL" was sufficient, regardless of the RunAs user. * The sudo lecture is now displayed immediately before the password prompt. As a result, sudo will no longer display the lecture unless the user needs to enter a password. Authentication methods that don't interact with the user via a terminal do not trigger the lecture. * Sudo now uses its own closefrom() emulation on Linux systems. The glibc version may not work in a chroot jail where /proc is not available. If close_range(2) is present, it will be used in preference to /proc/self/fd. What's new in Sudo 1.9.9 * Sudo can now be built with OpenSSL 3.0 without generating warnings about deprecated OpenSSL APIs. * A digest can now be specified along with the "ALL" command in the LDAP and SSSD back-ends. Sudo 1.9.0 introduced support for this in the sudoers file but did not include corresponding changes for the other back-ends. * visudo now only warns about an undefined alias or a cycle in an alias once for each alias. * The sudoRole cn was truncated by a single character in warning messages. * The cvtsudoers utility has new --group-file and --passwd-file options to use a custom passwd or group file when the --match-local option is also used. * The cvtsudoers utility can now filter or match based on a command. * The cvtsudoers utility can now produce output in csv (comma-separated value) format. This can be used to help generate entitlement reports. * Fixed a bug in sudo_logsrvd that could result in the connection being dropped for very long command lines. * Fixed a bug where sudo_logsrvd would not accept a restore point of zero. * Fixed a bug in visudo where the value of the "editor" setting was not used if it did not match the user's EDITOR environment variable. This was only a problem if the "env_editor" setting was not enabled. * Sudo now builds with the -fcf-protection compiler option and the "-z now" linker option if supported. * The output of "sudoreplay -l" now more closely matches the traditional sudo log format. * The sudo_sendlog utility will now use the full contents of the log.json file, if present. This makes it possible to send sudo-format I/O logs that use the newer log.json format to sudo_logsrvd without losing any information. * Fixed compilation of the arc4random_buf() replacement on systems with arc4random() but no arc4random_buf(). * Sudo now uses its own getentropy() by default on Linux. The GNU libc version of getentropy() will fail on older kernels that don't support the getrandom() system call. * It is now possible to build sudo with WolfSSL's OpenSSL compatibility layer by using the --enable-wolfssl configure option. * Fixed a bug related to Daylight Saving Time when parsing timestamps in Generalized Time format. This affected the NOTBEFORE and NOTAFTER options in sudoers. * Added the -O and -P options to visudo, which can be used to check or set the owner and permissions. This can be used in conjunction with the -c option to check that the sudoers file ownership and permissions are correct. * It is now possible to set resource limits in the sudoers file itself. The special values "default" and "user" refer to the default system limit and invoking user limit respectively. The core dump size limit is now set to 0 by default unless overridden by the sudoers file. * The cvtsudoers utility can now merge multiple sudoers sources into a single, combined sudoers file. If there are conflicting entries, cvtsudoers will attempt to resolve them but manual intervention may be required. The merging of sudoers rules is currently fairly simplistic but will be improved in a future release. * Sudo was parsing but not applying the "deref" and "tls_reqcert" ldap.conf settings. This meant the options were effectively ignored which broke dereferencing of aliases in LDAP. * Clarified in the sudo man page that the security policy may override the user's PATH environment variable. * When sudo is run in non-interactive mode (with the -n option), it will now attempt PAM authentication and only exit with an error if user interaction is required. This allows PAM modules that don't interact with the user to succeed. Previously, sudo would not attempt authentication if the -n option was specified. * Fixed a regression introduced in version 1.9.1 when sudo is built with the --with-fqdn configure option. The local host name was being resolved before the sudoers file was processed, making it impossible to disable DNS lookups by negating the "fqdn" sudoers option. * Added support for negated sudoUser attributes in the LDAP and SSSD sudoers back ends. A matching sudoUser that is negated will cause the sudoRole containing it to be ignored. * Fixed a bug where the stack resource limit could be set to a value smaller than that of the invoking user and not be reset before the command was run. What's new in Sudo 1.9.8p2 * Fixed a potential out-of-bounds read with "sudo -i" when the target user's shell is bash. This is a regression introduced in sudo 1.9.8. * sudo_logsrvd now only sends a log ID for first command of a session. There is no need to send the log ID for each sub-command. * Fixed a few minor memory leaks in intercept mode. * Fixed a problem with sudo_logsrvd in relay mode if "store_first" was enabled when handling sub-commands. A new zero-length journal file was created for each sub-command instead of simply using the existing journal file. * Fixed a bug where sudoedit would fail if one of the directories in the path to be edited had the immutable flag set (BSD, Linux or macOS). What's new in Sudo 1.9.8p1 * Fixed support for passing a prompt (sudo -p) or a login class (sudo -c) on the command line. This is a regression introduced in sudo 1.9.8. * Fixed a crash with "sudo ALL" rules in the LDAP and SSSD back-ends. This is a regression introduced in sudo 1.9.8. * Fixed a compilation error when the --enable-static-sudoers configure option was specified. This is a regression introduced in sudo 1.9.8 caused by a symbol clash with the intercept and log server protobuf functions. What's new in Sudo 1.9.8 * It is now possible to transparently intercepting sub-commands executed by the original command run via sudo. Intercept support is implemented using LD_PRELOAD (or the equivalent supported by the system) and so has some limitations. The two main limitations are that only dynamic executables are supported and only the execl, execle, execlp, execv, execve, execvp, and execvpe library functions are currently intercepted. Its main use case is to support restricting privileged shells run via sudo. To support this, there is a new "intercept" Defaults setting and an INTERCEPT command tag that can be used in sudoers. For example: Cmnd_Alias SHELLS=/bin/bash, /bin/sh, /bin/csh, /bin/ksh, /bin/zsh Defaults!SHELLS intercept would cause sudo to run the listed shells in intercept mode. This can also be set on a per-rule basis. For example: Cmnd_Alias SHELLS=/bin/bash, /bin/sh, /bin/csh, /bin/ksh, /bin/zsh chuck ALL = INTERCEPT: SHELLS would only apply intercept mode to user "chuck" when running one of the listed shells. In intercept mode, sudo will not prompt for a password before running a sub-command and will not allow a set-user-ID or set-group-ID program to be run by default. The new intercept_authenticate and intercept_allow_setid sudoers settings can be used to change this behavior. * The new "log_subcmds" sudoers setting can be used to log additional commands run in a privileged shell. It uses the same mechanism as the intercept support described above and has the same limitations. * The new "log_exit_status" sudoers setting can be used to log the exit status commands run via sudo. This is also a corresponding "log_exit" setting in the sudo_logsrvd.conf eventlog stanza. * Support for logging sudo_logsrvd errors via syslog or to a file. Previously, most sudo_logsrvd errors were only visible in the debug log. * Better diagnostics when there is a TLS certificate validation error. * Using the "+=" or "-=" operators in a Defaults setting that takes a string, not a list, now produces a warning from sudo and a syntax error from inside visudo. * Fixed a bug where the "iolog_mode" setting in sudoers and sudo_logsrvd had no effect when creating I/O log parent directories if the I/O log file name ended with the string "XXXXXX". * Fixed a bug in the sudoers custom prompt code where the size parameter that was passed to the strlcpy() function was incorrect. No overflow was possible since the correct amount of memory was already pre-allocated. * The mksigname and mksiglist helper programs are now built with the host compiler, not the target compiler, when cross-compiling. * Fixed compilation error when the --enable-static-sudoers configure option was specified. This was due to a typo introduced in sudo 1.9.7. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.7 2021/05/27 05:40:45 adam Exp $ d10 1 a10 1 --- configure.orig 2022-03-03 18:29:40.000000000 +0000 d12 1 a12 1 @@@@ -937,6 +937,7 @@@@ with_incpath d20 1 a20 1 @@@@ -1673,7 +1674,7 @@@@ Fine tuning of the installation director d29 1 a29 1 @@@@ -1801,6 +1802,7 @@@@ Optional Packages: d37 1 a37 1 @@@@ -5222,6 +5224,23 @@@@ fi d61 1 a61 1 @@@@ -17655,7 +17674,7 @@@@ fi d69 2 a70 2 # Check for SECCOMP_SET_MODE_FILTER in linux/seccomp.h @@@@ -19579,7 +19598,7 @@@@ then : d79 1 a79 1 @@@@ -27725,6 +27744,8 @@@@ fi d88 1 a88 1 @@@@ -32277,7 +32298,6 @@@@ test "$docdir" = '${datarootdir}/doc/${P @ 1.7 log @sudo: updated to 1.9.7 What's new in Sudo 1.9.7 * The "fuzz" Makefile target now runs all the fuzzers for 8192 passes (can be overridden via the FUZZ_RUNS variable). This makes it easier to run the fuzzers in-tree. To run a fuzzer indefinitely, set FUZZ_RUNS=-1, e.g. "make FUZZ_RUNS=-1 fuzz". * Fixed fuzzing on FreeBSD where the ld.lld linker returns an error by default when a symbol is multiply-defined. * Added support for determining local IPv6 addresses on systems that lack the getifaddrs() function. This now works on AIX, HP-UX and Solaris (at least). * Fixed a bug introduced in sudo 1.9.6 that caused "sudo -V" to report a usage error. Also, when invoked as sudoedit, sudo now allows a more restricted set of options that matches the usage statement and documentation. * Fixed a crash in sudo_sendlog when the specified certificate or key does not exist or is invalid. * Fixed a compilation error when sudo is configured with the --disable-log-client option. * Sudo's limited support for SUCCESS=return entries in nsswitch.conf is now documented. * Sudo now requires autoconf 2.70 or higher to regenerate the configure script. * sudo_logsrvd now has a relay mode which can be used to create a hierarchy of log servers. By default, when a relay server is defined, messages from the client are forwarded immediately to the relay. However, if the "store_first" setting is enabled, the log will be stored locally until the command completes and then relayed. * Sudo now links with OpenSSL by default if it is available unless the --disable-openssl configure option is used or both the --disable-log-client and --disable-log-server configure options are specified. * Fixed configure's Python version detection when the version minor number is more than a single digit, for example Python 3.10. * The sudo Python module tests now pass for Python 3.10. * Sudo will now avoid changing the datasize resource limit as long as the existing value is at least 1GB. This works around a problem on 64-bit HP-UX where it is not possible to exactly restore the original datasize limit. * Fixed a race condition that could result in a hang when sudo is executed by a process where the SIGCHLD handler is set to SIG_IGN. * Fixed an out-of-bounds read in sudoedit and visudo when the EDITOR, VISUAL or SUDO_EDITOR environment variables end in an unescaped backslash. Also fixed the handling of quote characters that are escaped by a backslash. * Fixed a bug that prevented the "log_server_verify" sudoers option from taking effect. * The sudo_sendlog utility has a new -s option to cause it to stop sending I/O records after a user-specified elapsed time. This can be used to test the I/O log restart functionality of sudo_logsrvd. * Fixed a crash introduced in sudo 1.9.4 in sudo_logsrvd when attempting to restart an interrupted I/O log transfer. * The TLS connection timeout in the sudoers log client was previously hard-coded to 10 seconds. It now uses the value of log_server_timeout. * The configure script now outputs a summary of the user-configurable options at the end, separate from output of configure script tests. * Corrected the description of which groups may be specified via the -g option in the Runas_Spec section. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.6 2021/03/18 08:57:48 adam Exp $ d10 1 a10 1 --- configure.orig 2021-05-11 20:54:52.000000000 +0000 d12 1 a12 1 @@@@ -920,6 +920,7 @@@@ with_incpath d20 1 a20 1 @@@@ -1653,7 +1654,7 @@@@ Fine tuning of the installation director d29 1 a29 1 @@@@ -1776,6 +1777,7 @@@@ Optional Packages: d37 1 a37 1 @@@@ -5184,6 +5186,23 @@@@ fi d61 1 a61 2 @@@@ -16373,7 +16392,7 @@@@ fi : ${mansectsu='1m'} d63 1 d70 1 a70 1 @@@@ -18253,7 +18272,7 @@@@ then : d79 1 a79 1 @@@@ -25171,6 +25190,8 @@@@ fi d88 1 a88 1 @@@@ -29359,7 +29380,6 @@@@ test "$docdir" = '${datarootdir}/doc/${P @ 1.6 log @sudo: updated to 1.9.6p1 Major changes between version 1.9.6p1 and 1.9.6: Fixed a regression introduced in sudo 1.9.6 that resulted in an error message instead of a usage message when sudo is run with no arguments. Major changes between version 1.9.6 and 1.9.5p2: Fixed a sudo_sendlog compilation problem with the AIX xlC compiler. Fixed a regression introduced in sudo 1.9.4 where the --disable-root-mailer configure option had no effect. Added a --disable-leaks configure option that avoids some memory leaks on exit that would otherwise occur. This is intended to be used with development tools that measure memory leaks. It is not safe to use in production at this time. Plugged some memory leaks identified by oss-fuzz and ASAN. Fixed the handling of sudoOptions for an LDAP sudoRole that contains multiple sudoCommands. Previously, some of the options would only be applied to the first sudoCommand. Fixed a potential out of bounds read in the parsing of NOTBEFORE and NOTAFTER sudoers command options (and their LDAP equivalents). The parser used for reading I/O log JSON files is now more resilient when processing invalid JSON. Fixed typos that prevented make uninstall from working. Fixed a regression introduced in sudo 1.9.4 where the last line in a sudoers file might not have a terminating NUL character added if no newline was present. Integrated oss-fuzz and LLVM's libFuzzer with sudo. The new --enable-fuzzer configure option can be combined with the --enable-sanitizer option to build sudo with fuzzing support. Multiple fuzz targets are available for fuzzing different parts of sudo. Fuzzers are built and tested via make fuzz or as part of make check (even when sudo is not built with fuzzing support). Fuzzing support currently requires the LLVM clang compiler (not gcc). Fixed the --enable-static-sudoers configure option. Fixed a potential out of bounds read sudo when is run by a user with more groups than the value of max_groups in sudo.conf. Added an admin_flag sudoers option to make the use of the ~/.sudo_as_admin_successful file configurable on systems where sudo is build with the --enable-admin-flag configure option. This mostly affects Ubuntu and its derivatives. The max_groups setting in sudo.conf is now limited to 1024. This setting is obsolete and should no longer be needed. Fixed a bug in the tilde expansion of CHROOT=dir and CWD=dir sudoers command options. A path ~/foo was expanded to /home/userfoo instead of /home/user/foo. This also affects the runchroot and runcwd Defaults settings. Fixed a bug on systems without a native getdelim(3) function where very long lines could cause parsing of the sudoers file to end prematurely. Fixed a potential integer overflow when converting the timestamp_timeout and passwd_timeout sudoers settings to a timespec struct. The default for the group_source setting in sudo.conf is now dynamic on macOS. Recent versions of macOS do not reliably return all of a user's non-local groups via getgroups(2), even when _DARWIN_UNLIMITED_GETGROUPS is defined. Fixed a potential use-after-free in the PAM conversation function. Fixed potential redefinition of sys/stat.h macros in sudo_compat.h. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.5 2021/01/30 11:06:45 spz Exp $ d10 1 a10 1 --- configure.orig 2021-03-15 16:50:00.000000000 +0000 d12 2 a13 1 @@@@ -920,6 +920,7 @@@@ with_libpath a14 1 with_efence d20 1 a20 1 @@@@ -1652,7 +1653,7 @@@@ Fine tuning of the installation director d30 1 a31 1 --with-efence link with -lefence for malloc() debugging d37 1 a37 1 @@@@ -5203,6 +5205,23 @@@@ fi d61 1 a61 1 @@@@ -16699,7 +16718,7 @@@@ fi d70 1 a70 2 @@@@ -18732,7 +18751,7 @@@@ then : printf "%s\n" "#define HAVE_LOGIN_CAP_H 1" >>confdefs.h d72 1 d79 1 a79 1 @@@@ -25528,6 +25547,8 @@@@ fi d88 1 a88 1 @@@@ -29695,7 +29716,6 @@@@ test "$docdir" = '${datarootdir}/doc/${P @ 1.5 log @security/sudo: build fix for netbsdelf systems @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.4 2021/01/18 14:32:24 taca Exp $ d10 3 a12 3 --- configure.orig 2021-01-23 16:45:11.000000000 +0100 +++ configure 2021-01-30 12:31:20.802349535 +0100 @@@@ -892,6 +892,7 @@@@ with_libpath d20 1 a20 1 @@@@ -1621,7 +1622,7 @@@@ Fine tuning of the installation director d29 1 a29 1 @@@@ -1737,6 +1738,7 @@@@ Optional Packages: d37 1 a37 1 @@@@ -4863,6 +4865,23 @@@@ fi d59 3 a61 3 if test "${with_passwd+set}" = set; then : withval=$with_passwd; case $with_passwd in @@@@ -15765,7 +15784,7 @@@@ fi d70 2 a71 2 @@@@ -18026,7 +18045,7 @@@@ if test "x$ac_cv_header_login_cap_h" = x _ACEOF d74 2 a75 2 - freebsd|netbsd) + dragonfly*|freebsd|netbsd*) d79 2 a80 39 @@@@ -23965,10 +23984,9 @@@@ if test ${with_pam-"no"} != "no"; then # Check for pam_start() in libpam first, then for pam_appl.h. # found_pam_lib=no - as_ac_Lib=`$as_echo "ac_cv_lib_pam_pam_start$lt_cv_dlopen_libs" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5 $as_echo_n "checking for pam_start in -lpam... " >&6; } -if eval \${$as_ac_Lib+:} false; then : +if ${ac_cv_lib_pam_pam_start+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@@@ -23992,18 +24010,17 @@@@ return pam_start (); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" + ac_cv_lib_pam_pam_start=yes else - eval "$as_ac_Lib=no" + ac_cv_lib_pam_pam_start=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5 +$as_echo "$ac_cv_lib_pam_pam_start" >&6; } +if test "x$ac_cv_lib_pam_pam_start" = xyes; then : found_pam_lib=yes fi @@@@ -24738,6 +24755,8 @@@@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext d87 2 a88 11 for ac_func in krb5_verify_user krb5_init_secure_context @@@@ -27120,7 +27139,7 @@@@ fi fi case "$OS" in - netbsd) + netbsd*) ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--enable-new-dtags" >&5 @@@@ -28297,7 +28316,6 @@@@ test "$docdir" = '${datarootdir}/doc/${P @ 1.4 log @security/sudo: update to 1.9.5p1 Update sudo package to 1.9.5p1. CHanges from 1.8.31p2 are too many to write here. Please refer . 1.9.5 fixes these security problems: * Fixed CVE-2021-23239, a potential information leak in sudoedit that could be used to test for the existence of directories not normally accessible to the user in certain circumstances. When creating a new file, sudoedit checks to make sure the parent directory of the new file exists before running the editor. However, a race condition exists if the invoking user can replace (or create) the parent directory. If a symbolic link is created in place of the parent directory, sudoedit will run the editor as long as the target of the link exists. If the target of the link does not exist, an error message will be displayed. The race condition can be used to test for the existence of an arbitrary directory. However, it cannot be used to write to an arbitrary location. * Fixed CVE-2021-23240, a flaw in the temporary file handling of sudoedit's SELinux RBAC support. On systems where SELinux is enabled, a user with sudoedit permissions may be able to set the owner of an arbitrary file to the user-ID of the target user. On Linux kernels that support protected symlinks setting /proc/sys/fs/protected_symlinks to 1 will prevent the bug from being exploited. For more information, see Symbolic link attack in SELinux-enabled sudoedit. Quote from 1.9.0 features: * The maximum length of a conversation reply has been increased from 255 to 1023 characters. This allows for longer user passwords. Bug #860. * Sudo now includes a logging daemon, sudo_logsrvd, which can be used to implement centralized logging of I/O logs. TLS connections are supported when sudo is configured with the --enable-openssl option. For more information, see the sudo_logsrvd, sudo_logsrvd.conf and sudo_logsrv.proto manuals as well as the log_servers setting in the sudoers manual. * The --disable-log-server and --disable-log-client configure options can be used to disable building the I/O log server and/or remote I/O log support in the sudoers plugin. * The new sudo_sendlog utility can be used to test sudo_logsrvd or send existing sudo I/O logs to a centralized server. * It is now possible to write sudo plugins in Python 4 when sudo is configured with the --enable-python option. See the sudo_plugin_python manual for details. Sudo 1.9.0 comes with several Python example plugins that get installed sudo's examples directory. The sudo blog article What's new in sudo 1.9: Python includes a simple tutorial on writing python plugins. * Sudo now supports an audit plugin type. An audit plugin receives accept, reject, exit and error messages and can be used to implement custom logging that is independent of the underlying security policy. Multiple audit plugins may be specified in the sudo.conf file. A sample audit plugin is included that writes logs in JSON format. * Sudo now supports an approval plugin type. An approval plugin is run only after the main security policy (such as sudoers) accepts a command to be run. The approval policy may perform additional checks, potentially interacting with the user. Multiple approval plugins may be specified in the sudo.conf file. Only if all approval plugins succeed will the command be allowed. * Sudo's -S command line option now causes the sudo conversation function to write to the standard output or standard error instead of the terminal device. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.3 2020/09/19 14:04:29 taca Exp $ d10 2 a11 2 --- configure.orig 2021-01-09 20:12:16.000000000 +0000 +++ configure d33 1 a33 1 + --with-nbsdops add NetBSD standard opt ions d75 1 a75 1 + dragonfly*|freebsd|netbsd) d125 9 @ 1.3 log @security/sudo: update to 1.8.31p2 Update sudo package to 1.8.31p2. What's new in Sudo 1.8.31p2 * Sudo command line options that take a value may only be specified once. This is to help guard against problems caused by poorly written scripts that invoke sudo with user-controlled input. Bug #924. * When running a command in a pty, sudo will no longer try to suspend itself if the user's tty has been revoked (for instance when the parent ssh daemon is killed). This fixes a bug where sudo would continuously suspend the command (which would succeed), then suspend itself (which would fail due to the missing tty) and then resume the command. * If sudo's event loop fails due to the tty being revoked, remove the user's tty events and restart the event loop (once). This fixes a problem when running "sudo reboot" in a pty on some systems. When the event loop exited unexpectedly, sudo would kill the command running in the pty, which in the case of "reboot", could lead to the system being in a half-rebooted state. * Fixed a regression introduced in sudo 1.8.23 in the LDAP and SSSD back-ends where a missing sudoHost attribute was treated as an "ALL" wildcard value. A sudoRole with no sudoHost attribute is now ignored as it was prior to version 1.8.23. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.2 2019/12/28 20:43:56 kim Exp $ d10 1 a10 1 --- configure.orig 2020-06-12 13:15:11.000000000 +0000 d12 1 a12 1 @@@@ -870,6 +870,7 @@@@ with_libpath d20 1 a20 1 @@@@ -1592,7 +1593,7 @@@@ Fine tuning of the installation director d29 1 a29 1 @@@@ -1706,6 +1707,7 @@@@ Optional Packages: d37 1 a37 1 @@@@ -4809,6 +4811,23 @@@@ fi d61 1 a61 1 @@@@ -15937,7 +15956,7 @@@@ fi d70 1 a70 1 @@@@ -18175,7 +18194,7 @@@@ if test "x$ac_cv_header_login_cap_h" = x d79 1 a79 1 @@@@ -23018,10 +23037,9 @@@@ if test ${with_pam-"no"} != "no"; then d92 1 a92 1 @@@@ -23045,18 +23063,17 @@@@ return pam_start (); d116 1 a116 1 @@@@ -23791,6 +23808,8 @@@@ fi d125 1 a125 2 @@@@ -27051,7 +27070,6 @@@@ test "$datarootdir" = '${prefix}/share' test "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)' d128 1 d132 1 a132 1 ac_config_files="$ac_config_files init.d/$INIT_SCRIPT" @ 1.3.4.1 log @Pullup ticket #6415 - requested by spz security/sudo: security fix Revisions pulled up: - security/sudo/Makefile 1.181-1.182 - security/sudo/PLIST 1.19 - security/sudo/distinfo 1.112-1.113 - security/sudo/patches/patch-configure 1.4 - security/sudo/patches/patch-examples_Makefile.in 1.1 - security/sudo/patches/patch-logsrvd_Makefile.in 1.1 - security/sudo/patches/patch-plugins_sudoers_Makefile.in 1.4 --- Module Name: pkgsrc Committed By: taca Date: Mon Jan 18 14:32:24 UTC 2021 Modified Files: pkgsrc/security/sudo: Makefile PLIST distinfo pkgsrc/security/sudo/patches: patch-configure patch-plugins_sudoers_Makefile.in Added Files: pkgsrc/security/sudo/patches: patch-examples_Makefile.in patch-logsrvd_Makefile.in Log Message: security/sudo: update to 1.9.5p1 Update sudo package to 1.9.5p1. CHanges from 1.8.31p2 are too many to write here. Please refer . 1.9.5 fixes these security problems: * Fixed CVE-2021-23239, a potential information leak in sudoedit that could be used to test for the existence of directories not normally accessible to the user in certain circumstances. When creating a new file, sudoedit checks to make sure the parent directory of the new file exists before running the editor. However, a race condition exists if the invoking user can replace (or create) the parent directory. If a symbolic link is created in place of the parent directory, sudoedit will run the editor as long as the target of the link exists. If the target of the link does not exist, an error message will be displayed. The race condition can be used to test for the existence of an arbitrary directory. However, it cannot be used to write to an arbitrary location. * Fixed CVE-2021-23240, a flaw in the temporary file handling of sudoedit's SELinux RBAC support. On systems where SELinux is enabled, a user with sudoedit permissions may be able to set the owner of an arbitrary file to the user-ID of the target user. On Linux kernels that support protected symlinks setting /proc/sys/fs/protected_symlinks to 1 will prevent the bug from being exploited. For more information, see Symbolic link attack in SELinux-enabled sudoedit. Quote from 1.9.0 features: * The maximum length of a conversation reply has been increased from 255 to 1023 characters. This allows for longer user passwords. Bug #860. * Sudo now includes a logging daemon, sudo_logsrvd, which can be used to implement centralized logging of I/O logs. TLS connections are supported when sudo is configured with the --enable-openssl option. For more information, see the sudo_logsrvd, sudo_logsrvd.conf and sudo_logsrv.proto manuals as well as the log_servers setting in the sudoers manual. * The --disable-log-server and --disable-log-client configure options can be used to disable building the I/O log server and/or remote I/O log support in the sudoers plugin. * The new sudo_sendlog utility can be used to test sudo_logsrvd or send existing sudo I/O logs to a centralized server. * It is now possible to write sudo plugins in Python 4 when sudo is configured with the --enable-python option. See the sudo_plugin_python manual for details. Sudo 1.9.0 comes with several Python example plugins that get installed sudo's examples directory. The sudo blog article What's new in sudo 1.9: Python includes a simple tutorial on writing python plugins. * Sudo now supports an audit plugin type. An audit plugin receives accept, reject, exit and error messages and can be used to implement custom logging that is independent of the underlying security policy. Multiple audit plugins may be specified in the sudo.conf file. A sample audit plugin is included that writes logs in JSON format. * Sudo now supports an approval plugin type. An approval plugin is run only after the main security policy (such as sudoers) accepts a command to be run. The approval policy may perform additional checks, potentially interacting with the user. Multiple approval plugins may be specified in the sudo.conf file. Only if all approval plugins succeed will the command be allowed. * Sudo's -S command line option now causes the sudo conversation function to write to the standard output or standard error instead of the terminal device. --- Module Name: pkgsrc Committed By: jperkin Date: Tue Jan 26 20:18:43 UTC 2021 Modified Files: pkgsrc/security/sudo: Makefile distinfo Log Message: sudo: Update to 1.9.5p2 for CVE-2021-3156. What's new in Sudo 1.9.5p2 * Fixed sudo's setprogname(3) emulation on systems that don't provide it. * Fixed a problem with the sudoers log server client where a partial write to the server could result the sudo process consuming large amounts of CPU time due to a cycle in the buffer queue. Bug #954. * Added a missing dependency on libsudo_util in libsudo_eventlog. Fixes a link error when building sudo statically. * The user's KRB5CCNAME environment variable is now preserved when performing PAM authentication. This fixes GSSAPI authentication when the user has a non-default ccache. * When invoked as sudoedit, the same set of command line options are now accepted as for "sudo -e". The -H and -P options are now rejected for sudoedit and "sudo -e" which matches the sudo 1.7 behavior. This is part of the fix for CVE-2021-3156. * Fixed a potential buffer overflow when unescaping backslashes in the command's arguments. Normally, sudo escapes special characters when running a command via a shell (sudo -s or sudo -i). However, it was also possible to run sudoedit with the -s or -i flags in which case no escaping had actually been done, making a buffer overflow possible. This fixes CVE-2021-3156. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.3 2020/09/19 14:04:29 taca Exp $ d10 1 a10 1 --- configure.orig 2021-01-09 20:12:16.000000000 +0000 d12 1 a12 1 @@@@ -892,6 +892,7 @@@@ with_libpath d20 1 a20 1 @@@@ -1621,7 +1622,7 @@@@ Fine tuning of the installation director d29 1 a29 1 @@@@ -1737,6 +1738,7 @@@@ Optional Packages: d37 1 a37 1 @@@@ -4863,6 +4865,23 @@@@ fi d61 1 a61 1 @@@@ -15765,7 +15784,7 @@@@ fi d70 1 a70 1 @@@@ -18026,7 +18045,7 @@@@ if test "x$ac_cv_header_login_cap_h" = x d79 1 a79 1 @@@@ -23965,10 +23984,9 @@@@ if test ${with_pam-"no"} != "no"; then d92 1 a92 1 @@@@ -23992,18 +24010,17 @@@@ return pam_start (); d116 1 a116 1 @@@@ -24738,6 +24755,8 @@@@ fi d125 2 a126 1 @@@@ -28297,7 +28316,6 @@@@ test "$docdir" = '${datarootdir}/doc/${P a128 1 test "$runstatedir" = '${localstatedir}/run' && runstatedir='$(localstatedir)/run' d132 1 a132 1 ac_config_files="$ac_config_files etc/init.d/$INIT_SCRIPT" @ 1.3.4.2 log @Pullup ticket #6416 - requested by spz security/sudo: NetBSD build fix Revisions pulled up: - security/sudo/Makefile 1.183 - security/sudo/distinfo 1.114 - security/sudo/patches/patch-configure 1.5 --- Module Name: pkgsrc Committed By: spz Date: Sat Jan 30 11:06:45 UTC 2021 Modified Files: pkgsrc/security/sudo: Makefile distinfo pkgsrc/security/sudo/patches: patch-configure Log Message: security/sudo: build fix for netbsdelf systems @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.3.4.1 2021/01/28 08:09:40 bsiegert Exp $ d10 2 a11 2 --- configure.orig 2021-01-23 16:45:11.000000000 +0100 +++ configure 2021-01-30 12:31:20.802349535 +0100 d33 1 a33 1 + --with-nbsdops add NetBSD standard options d75 1 a75 1 + dragonfly*|freebsd|netbsd*) a124 9 @@@@ -27120,7 +27139,7 @@@@ fi fi case "$OS" in - netbsd) + netbsd*) ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--enable-new-dtags" >&5 @ 1.2 log @Update to sudo 1.8.30beta3 * Portability fixes from pkgsrc have been merged upstream * Add runas_check_shell flag to require a runas user to have a valid shell. Not enabled by default. * Add a new flag "allow_unknown_runas_id" to control matching of unknown IDs. Previous, sudo would always allow unknown user or group IDs if the sudoers entry permitted it. This included the "ALL" alias. With this change, the admin must explicitly enable support for unknown IDs. * Transparently handle the "sudo sudoedit" problem. Some admin are confused about how to give users sudoedit permission and many users try to run sudoedit via sudo instead of directly. If the user runs "sudo sudoedit" sudo will now treat it as plain "sudoedit" after issuing a warning. If the admin has specified a fully-qualified path for sudoedit in sudoers, sudo will treat it as just "sudoedit" and match accordingly. In visudo (but not sudo), a fully-qualified path for sudoedit is now treated as an error. * When restoring old resource limits, try to recover if we receive EINVAL. On NetBSD, setrlimit(2) can return EINVAL if the new soft limit is lower than the current resource usage. This can be a problem when restoring the old stack limit if sudo has raised it. * Restore resource limits before executing the askpass program. Linux with docker seems to have issues executing a program when the stack size is unlimited. Bug #908 * macOS does not allow rlim_cur to be set to RLIM_INFINITY for RLIMIT_NOFILE. We need to use OPEN_MAX instead as per the macOS setrlimit manual. Bug #904 * Use 64-bit resource limits on AIX. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.1 2018/08/14 13:18:38 adam Exp $ d10 3 a12 3 --- configure.orig 2019-12-26 06:24:43.000000000 +0200 +++ configure 2019-12-28 21:41:28.049372280 +0200 @@@@ -869,6 +869,7 @@@@ d20 1 a20 1 @@@@ -1581,7 +1582,7 @@@@ d28 2 a29 2 --libdir=DIR object code libraries [EPREFIX/lib] @@@@ -1694,6 +1695,7 @@@@ d37 1 a37 1 @@@@ -4797,6 +4799,23 @@@@ d61 1 a61 1 @@@@ -15925,7 +15944,7 @@@@ d70 1 a70 1 @@@@ -18163,7 +18182,7 @@@@ d79 1 a79 1 @@@@ -22993,10 +23012,9 @@@@ d92 1 a92 1 @@@@ -23020,18 +23038,17 @@@@ d116 1 a116 1 @@@@ -23766,6 +23783,8 @@@@ d125 1 a125 1 @@@@ -27026,7 +27045,6 @@@@ @ 1.1 log @sudo: updated to 1.8.23 Sudo 1.8.23 * PAM account management modules and BSD auto approval modules are now run even when no password is required. * For kernel-based time stamps, if no terminal is present, fall back to parent-pid style time stamps. * The new cvtsudoers utility replaces both the "sudoers2ldif" script and the "visudo -x" functionality. It can read a file in either sudoers or LDIF format and produce JSON, LDIF or sudoers output. It is also possible to filter the generated output file by user, group or host name. * The file, ldap and sss sudoers backends now share a common set of formatting functions for "sudo -l" output, which is also used by the cvtsudoers utility. * The /run directory is now used in preference to /var/run if it exists. * More accurate descriptions of the --with-rundir and --with-vardir configure options. * The setpassent() and setgroupent() functions are now used on systems that support them to keep the passwd and group database open. Sudo performs a lot of passwd and group lookups so it can be beneficial to avoid opening and closing the files each time. * The new case_insensitive_user and case_insensitive_group sudoers options can be used to control whether sudo does case-sensitive matching of users and groups in sudoers. Case insensitive matching is now the default. * Fixed a bug on some systems where sudo could hang on command exit when I/O logging was enabled. * Fixed the build-time process start time test on Linux when the test is run from within a container. * When determining which temporary directory to use, sudoedit now checks the directory for writability before using it. Previously, sudoedit only performed an existence check. * Sudo now includes an optional set of Monty Python-inspired insults. * Fixed the execution of scripts with an associated digest (checksum) in sudoers on FreeBSD systems. FreeBSD does not have a proper /dev/fd directory mounted by default and its fexecve(2) is not fully POSIX compliant when executing scripts. * Chinese (Taiwan) translation for sudo from translationproject.org. @ text @d1 1 a1 1 $NetBSD: patch-ag,v 1.26 2017/05/31 02:33:12 maya Exp $ d10 3 a12 3 --- configure.orig 2017-05-29 20:33:06.000000000 +0000 +++ configure @@@@ -865,6 +865,7 @@@@ with_libpath d20 1 a20 1 @@@@ -1571,7 +1572,7 @@@@ Fine tuning of the installation director d29 1 a29 1 @@@@ -1674,6 +1675,7 @@@@ Optional Packages: d37 1 a37 1 @@@@ -4746,6 +4748,23 @@@@ fi d61 1 a61 1 @@@@ -15770,7 +15789,7 @@@@ fi d70 1 a70 1 @@@@ -17995,7 +18014,7 @@@@ if test "x$ac_cv_header_login_cap_h" = x d79 1 a79 1 @@@@ -22483,10 +22502,9 @@@@ if test ${with_pam-"no"} != "no"; then d92 1 a92 1 @@@@ -22510,18 +22528,17 @@@@ return pam_start (); d116 1 a116 1 @@@@ -23256,6 +23273,8 @@@@ fi d125 1 a125 1 @@@@ -26426,7 +26445,6 @@@@ test "$datarootdir" = '${prefix}/share' @ 1.1.14.1 log @Pullup ticket #6133 - requested by taca security/sudo: security fix Revisions pulled up: - security/sudo/Makefile 1.174-1.178 - security/sudo/distinfo 1.107-1.109 - security/sudo/patches/patch-Makefile.in 1.2 - security/sudo/patches/patch-configure 1.2 - security/sudo/patches/patch-include_sudo__compat.h deleted - security/sudo/patches/patch-include_sudo__event.h deleted - security/sudo/patches/patch-lib_util_sig2str.c deleted - security/sudo/patches/patch-lib_util_str2sig.c deleted - security/sudo/patches/patch-plugins_sudoers_Makefile.in 1.3 - security/sudo/patches/patch-plugins_sudoers_logging.c deleted - security/sudo/patches/patch-plugins_sudoers_starttime.c deleted - security/sudo/patches/patch-plugins_sudoers_sudoers.c deleted - security/sudo/patches/patch-src_Makefile.in 1.4 - security/sudo/patches/patch-src_limits.c deleted --- Module Name: pkgsrc Committed By: kim Date: Sat Dec 28 20:43:56 UTC 2019 Modified Files: pkgsrc/security/sudo: Makefile distinfo pkgsrc/security/sudo/patches: patch-Makefile.in patch-configure patch-plugins_sudoers_Makefile.in patch-src_Makefile.in Removed Files: pkgsrc/security/sudo/patches: patch-include_sudo__compat.h patch-include_sudo__event.h patch-lib_util_sig2str.c patch-lib_util_str2sig.c patch-plugins_sudoers_logging.c patch-plugins_sudoers_starttime.c patch-plugins_sudoers_sudoers.c patch-src_limits.c Log Message: Update to sudo 1.8.30beta3 * Portability fixes from pkgsrc have been merged upstream * Add runas_check_shell flag to require a runas user to have a valid shell. Not enabled by default. * Add a new flag "allow_unknown_runas_id" to control matching of unknown IDs. Previous, sudo would always allow unknown user or group IDs if the sudoers entry permitted it. This included the "ALL" alias. With this change, the admin must explicitly enable support for unknown IDs. * Transparently handle the "sudo sudoedit" problem. Some admin are confused about how to give users sudoedit permission and many users try to run sudoedit via sudo instead of directly. If the user runs "sudo sudoedit" sudo will now treat it as plain "sudoedit" after issuing a warning. If the admin has specified a fully-qualified path for sudoedit in sudoers, sudo will treat it as just "sudoedit" and match accordingly. In visudo (but not sudo), a fully-qualified path for sudoedit is now treated as an error. * When restoring old resource limits, try to recover if we receive EINVAL. On NetBSD, setrlimit(2) can return EINVAL if the new soft limit is lower than the current resource usage. This can be a problem when restoring the old stack limit if sudo has raised it. * Restore resource limits before executing the askpass program. Linux with docker seems to have issues executing a program when the stack size is unlimited. Bug #908 * macOS does not allow rlim_cur to be set to RLIM_INFINITY for RLIMIT_NOFILE. We need to use OPEN_MAX instead as per the macOS setrlimit manual. Bug #904 * Use 64-bit resource limits on AIX. --- Module Name: pkgsrc Committed By: kim Date: Wed Jan 1 01:47:29 UTC 2020 Modified Files: pkgsrc/security/sudo: Makefile distinfo Log Message: Update to sudo 1.8.30 Notable changes: * The version string no longer has the word "beta" in it. --- Module Name: pkgsrc Committed By: jperkin Date: Sat Jan 18 21:51:16 UTC 2020 Modified Files: pkgsrc/security/sudo: Makefile Log Message: *: Recursive revision bump for openssl 1.1.1. --- Module Name: pkgsrc Committed By: triaxx Date: Thu Jan 30 21:08:00 UTC 2020 Modified Files: pkgsrc/security/sudo: Makefile Log Message: sudo: update master site TW Aren FTP server seems down and the fetching step hangs for hours. --- Module Name: pkgsrc Committed By: kim Date: Mon Feb 3 07:47:56 UTC 2020 Modified Files: pkgsrc/security/sudo: Makefile distinfo Log Message: Update to sudo 1.8.31 What's new: * Fixed CVE-2019-18634, a buffer overflow when the "pwfeedback" sudoers option is enabled on systems with uni-directional pipes. * The "sudoedit_checkdir" option now treats a user-owned directory as writable, even if it does not have the write bit set at the time of check. Symbolic links will no longer be followed by sudoedit in any user-owned directory. Bug #912 * Fixed sudoedit on macOS 10.15 and above where the root file system is mounted read-only. Bug #913. * Fixed a crash introduced in sudo 1.8.30 when suspending sudo at the password prompt. Bug #914. * Fixed compilation on systems where the mmap MAP_ANON flag is not available. Bug #915. @ text @d1 1 a1 1 $NetBSD$ d10 3 a12 3 --- configure.orig 2019-12-26 06:24:43.000000000 +0200 +++ configure 2019-12-28 21:41:28.049372280 +0200 @@@@ -869,6 +869,7 @@@@ d20 1 a20 1 @@@@ -1581,7 +1582,7 @@@@ d29 1 a29 1 @@@@ -1694,6 +1695,7 @@@@ d37 1 a37 1 @@@@ -4797,6 +4799,23 @@@@ d61 1 a61 1 @@@@ -15925,7 +15944,7 @@@@ d70 1 a70 1 @@@@ -18163,7 +18182,7 @@@@ d79 1 a79 1 @@@@ -22993,10 +23012,9 @@@@ d92 1 a92 1 @@@@ -23020,18 +23038,17 @@@@ d116 1 a116 1 @@@@ -23766,6 +23783,8 @@@@ d125 1 a125 1 @@@@ -27026,7 +27045,6 @@@@ @