Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi

This commit is contained in:
HardenedBSD Sync Services 2024-12-03 06:01:32 -07:00
commit dfad9f3f08
No known key found for this signature in database

View File

@ -42,11 +42,28 @@ esac
if checkyesno sendmail_enable; then
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
_sendmail_run=true
fi
# If sendmail_submit_enable=yes, don't need outbound daemon
if checkyesno sendmail_submit_enable; then
name="sendmail_submit"
rcvar="sendmail_submit_enable"
sendmail_outbound_enable="NO"
_sendmail_run=true
fi
if checkyesno sendmail_outbound_enable; then
name="sendmail_outbound"
rcvar="sendmail_outbound_enable"
_sendmail_run=true
fi
if checkyesno sendmail_msp_queue_enable; then
_sendmail_msp_queue_run=true
else
# Make sure run_rc_command is called at least once.
_sendmail_run=true
fi
sendmail_cert_create()
@ -166,8 +183,8 @@ sendmail_precmd()
# Die if there's pre-8.10 custom configuration file. This check is
# mandatory for smooth upgrade. See NetBSD PR 10100 for details.
#
if checkyesno ${rcvar} && [ -f "/etc/${name}.cf" ]; then
if ! cmp -s "/etc/mail/${name}.cf" "/etc/${name}.cf"; then
if checkyesno ${rcvar} && [ -f "/etc/sendmail.cf" ]; then
if ! cmp -s "/etc/mail/sendmail.cf" "/etc/sendmail.cf"; then
warn \
"${name} was not started; you have multiple copies of sendmail.cf."
return 1
@ -205,33 +222,19 @@ sendmail_precmd()
fi
}
run_rc_command "$1"
if ${_sendmail_run:-false}; then
run_rc_command "$1"
fi
_ret=$?
required_files=
if checkyesno sendmail_submit_enable; then
name="sendmail_submit"
rcvar="sendmail_submit_enable"
if ${_sendmail_msp_queue_run:-false}; then
name="sendmail_msp_queue"
rcvar="sendmail_msp_queue_enable"
pidfile="${sendmail_msp_queue_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
required_files="/etc/mail/submit.cf"
_rc_restart_done=false
run_rc_command "$1"
_ret=$(( _ret > $? ? _ret : $? ))
fi
if checkyesno sendmail_outbound_enable; then
name="sendmail_outbound"
rcvar="sendmail_outbound_enable"
_rc_restart_done=false
run_rc_command "$1"
_ret=$(( _ret > $? ? _ret : $? ))
fi
name="sendmail_msp_queue"
rcvar="sendmail_msp_queue_enable"
pidfile="${sendmail_msp_queue_pidfile:-/var/spool/clientmqueue/sm-client.pid}"
required_files="/etc/mail/submit.cf"
_rc_restart_done=false
run_rc_command "$1"
_ret=$(( _ret > $? ? _ret : $? ))
(exit "$_ret")