net-misc/openssh: Sync with Gentoo

It's from Gentoo commit f4b8907daabaff433a837ca6356bf1fb6649e551.
This commit is contained in:
Flatcar Buildbot 2024-07-16 11:23:27 +00:00 committed by Mathieu Tortuyaux
parent 12900357b1
commit 0cf4f6037c
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8
4 changed files with 32 additions and 2 deletions

View File

@ -0,0 +1,14 @@
https://bugzilla.mindrot.org/show_bug.cgi?id=3707
https://bugs.gentoo.org/935353
--- a/openbsd-compat/port-linux.c
+++ b/openbsd-compat/port-linux.c
@@ -366,7 +366,7 @@ ssh_systemd_notify(const char *fmt, ...)
error_f("socket \"%s\": %s", path, strerror(errno));
goto out;
}
- if (connect(fd, &addr, sizeof(addr)) != 0) {
+ if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
error_f("socket \"%s\" connect: %s", path, strerror(errno));
goto out;
}

View File

@ -0,0 +1,15 @@
[Unit]
Description=OpenSSH server daemon
After=network.target auditd.service
[Service]
Type=notify-reload
ExecStartPre=/usr/bin/ssh-keygen -A
ExecStart=/usr/sbin/sshd -D -e
KillMode=process
OOMPolicy=continue
Restart=on-failure
RestartSec=42s
[Install]
WantedBy=multi-user.target

View File

@ -20,7 +20,7 @@ S="${WORKDIR}/${PARCH}"
LICENSE="BSD GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
# Probably want to drop ssl defaulting to on in a future version.
IUSE="abi_mips_n32 audit debug kerberos ldns libedit livecd pam +pie security-key selinux +ssl static test xmss"

View File

@ -79,6 +79,7 @@ PATCHES=(
"${FILESDIR}/${PN}-9.4_p1-Allow-MAP_NORESERVE-in-sandbox-seccomp-filter-maps.patch"
"${FILESDIR}/${PN}-9.6_p1-fix-xmss-c99.patch"
"${FILESDIR}/${PN}-9.7_p1-config-tweaks.patch"
"${FILESDIR}/${PN}-9.8_p1-musl-connect.patch"
)
pkg_pretend() {
@ -318,7 +319,7 @@ src_install() {
rmdir "${ED}"/var/empty || die
systemd_dounit "${FILESDIR}"/sshd.socket
systemd_newunit "${FILESDIR}"/sshd.service.1 sshd.service
systemd_newunit "${FILESDIR}"/sshd.service.2 sshd.service
systemd_newunit "${FILESDIR}"/sshd_at.service.1 'sshd@.service'
# Install dropins with explicit mode, bug 906638, 915840