summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authortoshii <toshii>2002-06-25 18:09:45 +0000
committertoshii <toshii>2002-06-25 18:09:45 +0000
commitd56e8a71baeb00b0f789d892006597662f507731 (patch)
tree193ae8fe33ebd3eed75f1ded5c09ca607827d786 /security
parentc1fa71d247025fda8f5276c7f88628b5569a8627 (diff)
downloadpkgsrc-d56e8a71baeb00b0f789d892006597662f507731.tar.gz
Add patches to enable compression and privsep on platforms without MAP_ANON
(such as Solaris2.6). Patches are partly from itojun.
Diffstat (limited to 'security')
-rw-r--r--security/openssh/distinfo4
-rw-r--r--security/openssh/patches/patch-ac30
-rw-r--r--security/openssh/patches/patch-ad13
3 files changed, 46 insertions, 1 deletions
diff --git a/security/openssh/distinfo b/security/openssh/distinfo
index 37e00151910..673da5d3d4f 100644
--- a/security/openssh/distinfo
+++ b/security/openssh/distinfo
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.18 2002/06/25 02:13:12 itojun Exp $
+$NetBSD: distinfo,v 1.19 2002/06/25 18:10:50 toshii Exp $
SHA1 (openssh-3.3p1.tar.gz) = 386212e32297acec0f0f2e84cca457be61e4ee53
Size (openssh-3.3p1.tar.gz) = 831189 bytes
SHA1 (patch-aa) = 0287823fc0c5953996891576b4d3571e08618b3d
SHA1 (patch-ab) = 8a7c9c0802a5089ef25ae91a520772a09a2b5000
+SHA1 (patch-ac) = b61f7eacf8ddf36a4bd1e15eef7b16be6f3aaf5b
+SHA1 (patch-ad) = a43dd3929ab48c5c02070fbbabb3b72d19f74a8f
SHA1 (patch-ah) = 9913c868bde5d318915b1dee2c05dcf454a0f506
diff --git a/security/openssh/patches/patch-ac b/security/openssh/patches/patch-ac
new file mode 100644
index 00000000000..ae3f46158c4
--- /dev/null
+++ b/security/openssh/patches/patch-ac
@@ -0,0 +1,30 @@
+$NetBSD: patch-ac,v 1.7 2002/06/25 18:09:45 toshii Exp $
+
+--- monitor_mm.c.orig Fri Jun 7 10:57:25 2002
++++ monitor_mm.c
+@@ -71,6 +71,9 @@
+ {
+ void *address;
+ struct mm_master *mm;
++#if defined(HAVE_MMAP) && !defined(MAP_ANON)
++ int fd;
++#endif
+
+ if (mmalloc == NULL)
+ mm = xmalloc(sizeof(struct mm_master));
+@@ -87,6 +90,15 @@
+ #if defined(HAVE_MMAP) && defined(MAP_ANON)
+ address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED,
+ -1, 0);
++ if (address == MAP_FAILED)
++ fatal("mmap(%lu): %s", (u_long)size, strerror(errno));
++#elif defined(HAVE_MMAP) && !defined(MAP_ANON)
++ fd = open("/dev/zero", O_RDWR);
++ if (fd < 0)
++ fatal("open(/dev/zero): %s", strerror(errno));
++ address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_SHARED,
++ fd, 0);
++ close(fd);
+ if (address == MAP_FAILED)
+ fatal("mmap(%lu): %s", (u_long)size, strerror(errno));
+ #else
diff --git a/security/openssh/patches/patch-ad b/security/openssh/patches/patch-ad
new file mode 100644
index 00000000000..4e406f007f4
--- /dev/null
+++ b/security/openssh/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.4 2002/06/25 18:09:46 toshii Exp $
+
+--- servconf.c.orig Fri Jun 21 15:20:44 2002
++++ servconf.c
+@@ -257,7 +257,7 @@
+ if (use_privsep == -1)
+ use_privsep = 1;
+
+-#if !defined(HAVE_MMAP) || !defined(MAP_ANON)
++#if !defined(HAVE_MMAP)
+ if (use_privsep && options->compression == 1) {
+ error("This platform does not support both privilege "
+ "separation and compression");