2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2002-10-17 10:55:05 +02:00
|
|
|
#
|
|
|
|
# openssh
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2002-10-17 10:55:05 +02:00
|
|
|
|
2017-10-26 14:52:47 +02:00
|
|
|
OPENSSH_VERSION = 7.6p1
|
2010-12-01 15:44:26 +01:00
|
|
|
OPENSSH_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable
|
2017-03-30 15:43:39 +02:00
|
|
|
OPENSSH_LICENSE = BSD-3-Clause, BSD-2-Clause, Public Domain
|
2014-05-06 17:42:38 +02:00
|
|
|
OPENSSH_LICENSE_FILES = LICENCE
|
openssh: fix sshd for MIPS64 n32
This patch backports two patches that have been sent upstream as a pull
request in order to fix sshd for MIPS64 n32.
The first patch adds support for detecting the MIPS ABI during the
configure phase.
The second patch sets the right value to seccomp_audit_arch taking into
account the MIPS64 ABI.
Currently seccomp_audit_arch is set to AUDIT_ARCH_MIPS64 or
AUDIT_ARCH_MIPSEL64 (depending on the endinness) when openssh is built
for MIPS64. However, that's only valid for n64 ABI. The right macros for
n32 ABI defined in seccomp.h are AUDIT_ARCH_MIPS64N32 and
AUDIT_ARCH_MIPSEL64N32, for big and little endian respectively.
Because of that an sshd built for MIPS64 n32 rejects connection attempts
and the output of strace reveals that the problem is related to seccomp
audit:
[pid 194] prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=57,
filter=0x555d5da0}) = 0
[pid 194] write(7, "\0\0\0]\0\0\0\5\0\0\0Ulist_hostkey_types: "..., 97) = ?
[pid 193] <... poll resumed> ) = 2 ([{fd=5, revents=POLLIN|POLLHUP},
{fd=6, revents=POLLHUP}])
[pid 194] +++ killed by SIGSYS +++
Pull request: https://github.com/openssh/openssh-portable/pull/71
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-06-20 18:15:19 +02:00
|
|
|
# Autoreconf needed due to the following patches modifying configure.ac:
|
2017-07-02 18:53:31 +02:00
|
|
|
# 0001-configure-ac-detect-mips-abi.patch
|
|
|
|
# 0002-configure-ac-properly-set-seccomp-audit-arch-for-mips64.patch
|
openssh: fix sshd for MIPS64 n32
This patch backports two patches that have been sent upstream as a pull
request in order to fix sshd for MIPS64 n32.
The first patch adds support for detecting the MIPS ABI during the
configure phase.
The second patch sets the right value to seccomp_audit_arch taking into
account the MIPS64 ABI.
Currently seccomp_audit_arch is set to AUDIT_ARCH_MIPS64 or
AUDIT_ARCH_MIPSEL64 (depending on the endinness) when openssh is built
for MIPS64. However, that's only valid for n64 ABI. The right macros for
n32 ABI defined in seccomp.h are AUDIT_ARCH_MIPS64N32 and
AUDIT_ARCH_MIPSEL64N32, for big and little endian respectively.
Because of that an sshd built for MIPS64 n32 rejects connection attempts
and the output of strace reveals that the problem is related to seccomp
audit:
[pid 194] prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=57,
filter=0x555d5da0}) = 0
[pid 194] write(7, "\0\0\0]\0\0\0\5\0\0\0Ulist_hostkey_types: "..., 97) = ?
[pid 193] <... poll resumed> ) = 2 ([{fd=5, revents=POLLIN|POLLHUP},
{fd=6, revents=POLLHUP}])
[pid 194] +++ killed by SIGSYS +++
Pull request: https://github.com/openssh/openssh-portable/pull/71
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-06-20 18:15:19 +02:00
|
|
|
OPENSSH_AUTORECONF = YES
|
2011-02-07 10:55:04 +01:00
|
|
|
OPENSSH_CONF_ENV = LD="$(TARGET_CC)" LDFLAGS="$(TARGET_CFLAGS)"
|
2014-12-24 08:54:24 +01:00
|
|
|
OPENSSH_CONF_OPTS = \
|
|
|
|
--sysconfdir=/etc/ssh \
|
|
|
|
--disable-lastlog \
|
|
|
|
--disable-utmp \
|
|
|
|
--disable-utmpx \
|
|
|
|
--disable-wtmp \
|
|
|
|
--disable-wtmpx \
|
|
|
|
--disable-strip
|
2002-10-17 10:55:05 +02:00
|
|
|
|
2014-10-27 19:18:55 +01:00
|
|
|
define OPENSSH_USERS
|
2014-11-03 00:39:51 +01:00
|
|
|
sshd -1 sshd -1 * - - - SSH drop priv user
|
2014-10-27 19:18:55 +01:00
|
|
|
endef
|
|
|
|
|
2016-07-11 16:35:14 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
|
2015-08-29 09:46:35 +02:00
|
|
|
OPENSSH_CONF_OPTS += --without-pie
|
|
|
|
endif
|
2014-07-30 14:32:21 +02:00
|
|
|
|
2008-09-24 14:00:57 +02:00
|
|
|
OPENSSH_DEPENDENCIES = zlib openssl
|
2003-11-12 10:31:12 +01:00
|
|
|
|
2017-04-18 15:03:03 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y)
|
|
|
|
OPENSSH_DEPENDENCIES += cryptodev-linux
|
|
|
|
OPENSSH_CONF_OPTS += --with-ssl-engine
|
|
|
|
else
|
|
|
|
OPENSSH_CONF_OPTS += --without-ssl-engine
|
|
|
|
endif
|
|
|
|
|
2012-09-15 16:27:53 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
|
2015-07-14 22:20:22 +02:00
|
|
|
define OPENSSH_INSTALL_PAM_CONF
|
|
|
|
$(INSTALL) -D -m 644 $(@D)/contrib/sshd.pam.generic $(TARGET_DIR)/etc/pam.d/sshd
|
|
|
|
$(SED) '\%password required /lib/security/pam_cracklib.so%d' $(TARGET_DIR)/etc/pam.d/sshd
|
|
|
|
$(SED) 's/\#UsePAM no/UsePAM yes/' $(TARGET_DIR)/etc/ssh/sshd_config
|
|
|
|
endef
|
|
|
|
|
2012-09-15 16:27:53 +02:00
|
|
|
OPENSSH_DEPENDENCIES += linux-pam
|
2014-09-27 21:32:44 +02:00
|
|
|
OPENSSH_CONF_OPTS += --with-pam
|
2015-07-14 22:20:22 +02:00
|
|
|
OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_PAM_CONF
|
|
|
|
else
|
|
|
|
OPENSSH_CONF_OPTS += --without-pam
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
|
|
|
|
OPENSSH_DEPENDENCIES += libselinux
|
|
|
|
OPENSSH_CONF_OPTS += --with-selinux
|
|
|
|
else
|
|
|
|
OPENSSH_CONF_OPTS += --without-selinux
|
2012-09-15 16:27:53 +02:00
|
|
|
endif
|
|
|
|
|
2013-12-04 11:37:53 +01:00
|
|
|
define OPENSSH_INSTALL_INIT_SYSTEMD
|
|
|
|
$(INSTALL) -D -m 644 package/openssh/sshd.service \
|
2015-03-20 20:13:59 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/sshd.service
|
2013-12-04 11:37:53 +01:00
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
2015-03-20 20:13:59 +01:00
|
|
|
ln -fs ../../../../usr/lib/systemd/system/sshd.service \
|
2013-12-04 11:37:53 +01:00
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/sshd.service
|
2010-09-01 22:48:22 +02:00
|
|
|
endef
|
|
|
|
|
2013-12-04 11:37:53 +01:00
|
|
|
define OPENSSH_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 755 package/openssh/S50sshd \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S50sshd
|
|
|
|
endef
|
2010-09-01 22:48:22 +02:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|