openssh: update 9.1p1
This commit is contained in:
parent
987ab97e4e
commit
66e9752d60
@ -6,11 +6,12 @@
|
||||
###########################################################
|
||||
# Check the following 4 variables before running the script
|
||||
topdir=openssh
|
||||
version=9.0p1
|
||||
version=9.1p1
|
||||
pkgver=1
|
||||
source[0]=https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/$topdir-$version.tar.gz
|
||||
# If there are no patches, simply comment this
|
||||
patch[0]=0007-Fix-authopt-test-on-platforms-without-IPv6-support.patch
|
||||
patch[1]=0001-Workaround-missing-MAP_ANON.patch
|
||||
|
||||
# Source function library
|
||||
. ${BUILDPKG_SCRIPTS}/buildpkg.functions
|
||||
@ -18,7 +19,7 @@ patch[0]=0007-Fix-authopt-test-on-platforms-without-IPv6-support.patch
|
||||
# Global settings
|
||||
export LDFLAGS="-R$prefix/lib -L$prefix/lib"
|
||||
export CPPFLAGS="-I$prefix/include"
|
||||
export CC=gcc
|
||||
export CC="gcc"
|
||||
make_check_target="tests"
|
||||
|
||||
configure_args=(--prefix=$prefix --mandir=$prefix/$_mandir --sysconfdir=$prefix/${_sysconfdir}/ssh --datadir=$prefix/${_sharedir}/openssh --with-default-path=/usr/bin:$prefix/${_bindir} --with-mantype=man --with-pam --with-privsep-user=sshd --with-privsep-path=/var/empty/sshd --with-superuser-path=/usr/bin:/usr/sbin:$prefix/$_bindir:$prefix/$_sbindir --with-lastlog=/var/adm/lastlog --without-zlib-version-check)
|
||||
@ -27,8 +28,6 @@ reg prep
|
||||
prep()
|
||||
{
|
||||
generic_prep
|
||||
setdir source
|
||||
autoreconf
|
||||
}
|
||||
|
||||
reg build
|
||||
|
@ -1,5 +1,8 @@
|
||||
CHANGELOG
|
||||
---------
|
||||
--------
|
||||
* Wed Oct 05 2022 Tom G. Christensen <swpkg@jupiterrise.com> - 9.1p1-1
|
||||
- Update to 9.1p1
|
||||
|
||||
* Fri Apr 08 2022 Tom G. Christensen <swpkg@jupiterrise.com> - 9.0p1-1
|
||||
- Update to 9.0p1
|
||||
|
||||
|
54
openssh/src/0001-Workaround-missing-MAP_ANON.patch
Normal file
54
openssh/src/0001-Workaround-missing-MAP_ANON.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 2117a08838a57b2d042cc7df7010ff6a863613f6 Mon Sep 17 00:00:00 2001
|
||||
From: "Tom G. Christensen" <tgc@jupiterrise.com>
|
||||
Date: Sun, 16 Oct 2022 18:29:07 +0200
|
||||
Subject: [PATCH] Workaround missing MAP_ANON
|
||||
|
||||
On Solaris MAP_ANON is only available from Solaris 8 and onward so a
|
||||
workaround is needed.
|
||||
This patch is based on https://stackoverflow.com/a/39945292
|
||||
---
|
||||
openbsd-compat/arc4random.h | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/openbsd-compat/arc4random.h b/openbsd-compat/arc4random.h
|
||||
index 2b57611f..a7cbe1c4 100644
|
||||
--- a/openbsd-compat/arc4random.h
|
||||
+++ b/openbsd-compat/arc4random.h
|
||||
@@ -63,6 +63,7 @@ _rs_forkdetect(void)
|
||||
static inline int
|
||||
_rs_allocate(struct _rs **rsp, struct _rsx **rsxp)
|
||||
{
|
||||
+#ifdef MAP_ANON
|
||||
if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE,
|
||||
MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED)
|
||||
return (-1);
|
||||
@@ -73,6 +74,26 @@ _rs_allocate(struct _rs **rsp, struct _rsx **rsxp)
|
||||
*rsp = NULL;
|
||||
return (-1);
|
||||
}
|
||||
+#else /*Map /dev/zero*/
|
||||
+ int fd;
|
||||
+ fd = open("/dev/zero", O_RDWR);
|
||||
+ if (fd == -1)
|
||||
+ return (-1);
|
||||
+
|
||||
+ if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE,
|
||||
+ MAP_PRIVATE, fd, 0)) == MAP_FAILED)
|
||||
+ return (-1);
|
||||
+
|
||||
+ if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE,
|
||||
+ MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
|
||||
+ munmap(*rsp, sizeof(**rsp));
|
||||
+ *rsp = NULL;
|
||||
+ return (-1);
|
||||
+ }
|
||||
+
|
||||
+ if (close(fd) == -1) /*No longer needed*/
|
||||
+ return (-1);
|
||||
+#endif
|
||||
|
||||
_ARC4_ATFORK(_rs_forkhandler);
|
||||
return (0);
|
||||
--
|
||||
2.36.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user