Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
This update was made based on information from https://repology.org/metapackage/sudo/versions.
These checks were done:
- built on NixOS
- ran ‘/nix/store/d2g0ybmppcar8k38jjiqqdz8s3knwrrm-sudo-1.8.23/bin/cvtsudoers -h’ got 0 exit code
- ran ‘/nix/store/d2g0ybmppcar8k38jjiqqdz8s3knwrrm-sudo-1.8.23/bin/cvtsudoers --help’ got 0 exit code
- ran ‘/nix/store/d2g0ybmppcar8k38jjiqqdz8s3knwrrm-sudo-1.8.23/bin/sudoreplay -h’ got 0 exit code
- ran ‘/nix/store/d2g0ybmppcar8k38jjiqqdz8s3knwrrm-sudo-1.8.23/bin/sudoreplay --help’ got 0 exit code
- ran ‘/nix/store/d2g0ybmppcar8k38jjiqqdz8s3knwrrm-sudo-1.8.23/bin/sudoreplay -V’ and found version 1.8.23
- ran ‘/nix/store/d2g0ybmppcar8k38jjiqqdz8s3knwrrm-sudo-1.8.23/bin/sudoreplay --version’ and found version 1.8.23
- ran ‘/nix/store/d2g0ybmppcar8k38jjiqqdz8s3knwrrm-sudo-1.8.23/bin/visudo -h’ got 0 exit code
- ran ‘/nix/store/d2g0ybmppcar8k38jjiqqdz8s3knwrrm-sudo-1.8.23/bin/visudo --help’ got 0 exit code
- found 1.8.23 with grep in /nix/store/d2g0ybmppcar8k38jjiqqdz8s3knwrrm-sudo-1.8.23
- directory tree listing: https://gist.github.com/4d6cfc75cde31a340e8a41bf3d969564
Otherwise it will try to guess the log directory, and the guess might
not be the same if chroot builds are enabled or not.
The gruesome details from m4/sudo.m4:
````
dnl
dnl Where the I/O log files go, use /var/log/sudo-io if
dnl /var/log exists, else /{var,usr}/adm/sudo-io
dnl
AC_DEFUN([SUDO_IO_LOGDIR], [
AC_MSG_CHECKING(for I/O log dir location)
if test "${with_iologdir-yes}" != "yes"; then
iolog_dir="$with_iologdir"
elif test -d "/var/log"; then
iolog_dir="/var/log/sudo-io"
elif test -d "/var/adm"; then
iolog_dir="/var/adm/sudo-io"
else
iolog_dir="/usr/adm/sudo-io"
fi
if test "${with_iologdir}" != "no"; then
SUDO_DEFINE_UNQUOTED(_PATH_SUDO_IO_LOGDIR, "$iolog_dir")
fi
AC_MSG_RESULT($iolog_dir)
])dnl
````
The feature Nix neither needs nor deserves.
Requires the "insults" to be explicitly enabled in sudoers.
This adds 1.6 MB to your sudo as some kind of cruel meta-joke.
The current sudo password prompt is "Password: ", while distros like
e.g. Ubuntu and Arch Linux use "[sudo] password for %p: ", where "%p"
expands to the username of the user running sudo.
Adopt the prompt from other distros because it makes it less confusing
when running commands with sudo that themselves ask for a password.
It currently seems impossible to make sudo send emails. No matter how much
debugging I enable, sudo continues to be silent about sendmail. I tried setting
"Defaults mailerpath=/var/setuid-wrappers/sendmail" but that too was completely
ignored (except for logging that the variable mailerpath exists with the value
I assigned to it...).
This enables sendmail support and sets a default value that works on NixOS.