I'm unable to build recently updated sudo 1.9.4.
Poudriere log says:
[00:01:07] --- eventlog.lo ---
[00:01:07] ./eventlog.c:94:5: error: use of undeclared identifier '_PATH_SUDO_SENDMAIL'
[00:01:07] _PATH_SUDO_SENDMAIL, /* mailerpath */
[00:01:07] ./eventlog.c:1440:24: error: use of undeclared identifier '_PATH_SUDO_SENDMAIL'
[00:01:07] evl_conf.mailerpath = _PATH_SUDO_SENDMAIL;
[00:01:07] 2 errors generated.
[00:01:07] *** [eventlog.lo] Error code 1
(In reply to Alexander Kuznetsov from comment #0)
What is the FreeBSD version and arch? What OPTIONS are set/unset?
(In reply to Renato Botelho from comment #1)
I'm building sudo on FreeBSD 12:
# uname -KUrm
12.2-RELEASE-p1 amd64 1202000 1202000
with next options:
[00:00:00] ---Begin OPTIONS List---
[00:00:00] ===> The following configuration options are available for sudo-1.9.4:
[00:00:00] AUDIT=on: Enable BSM audit support
[00:00:00] DISABLE_AUTH=off: Do not require authentication by default
[00:00:00] DISABLE_ROOT_SUDO=off: Do not allow root to run sudo
[00:00:00] DOCS=on: Build and/or install documentation
[00:00:00] EXAMPLES=off: Build and/or install examples
[00:00:00] INSULTS=off: Enable insults on failures
[00:00:00] LDAP=off: LDAP protocol support
[00:00:00] NLS=off: Native Language Support
[00:00:00] NOARGS_SHELL=off: Run a shell if no arguments are given
[00:00:00] OPIE=off: Enable one-time passwords (no PAM support)
[00:00:00] PAM=on: Pluggable authentication module support
[00:00:00] PYTHON=off: Enable python plugin support
[00:00:00] SSSD=off: Enable SSSD backend support.
[00:00:00] ====> Enable Kerberos 5 authentication (no PAM support): you can only select none or one of them
[00:00:00] GSSAPI_BASE=off: GSSAPI support via base system (needs Kerberos)
[00:00:00] GSSAPI_HEIMDAL=off: GSSAPI support via security/heimdal
[00:00:00] GSSAPI_MIT=off: GSSAPI support via security/krb5
[00:00:00] ===> Use 'make config' to modify these settings
[00:00:00] ---End OPTIONS List---
And also I use sendmail from ports instead of sendmail in base if it matters, so I have defined next options in make.conf:
OPTIONS_SET+= SENDMAIL_PORT MILTER_PORT
on: FreeBSD myhost 12.2-STABLE FreeBSD 12.2-STABLE FREEBSD amd64 1202504 1202504
got the same error as on build tree with custom build environment.
turns out, lib/eventlog was added, including the struct throwing the error.
root cause for me:
building --without-sendmail does not work anymore (#define missing if chosen).
set SENDMAILPROG env var to /usr/sbin/sendmail.
explicitely add --with-sendmail to configure args.
off topic: static build is also broken because of eventlog stuff.
A commit references this bug:
Date: Mon Dec 7 12:43:26 UTC 2020
New revision: 557225
security/sudo: Fix build without sendmail
Reported by: Alexander Kuznetsov <firstname.lastname@example.org>
Obtained from: https://www.sudo.ws/repos/sudo/raw-rev/41db1aad85bb
Sponsored by: Rubicon Communications, LLC (Netgate)