From dfdd452f0521276ad84cbccbc10536acf39de549 Mon Sep 17 00:00:00 2001 From: Zach Dykstra Date: Thu, 31 Dec 2020 11:48:13 -0600 Subject: [PATCH] OpenSSH: fix ControlMaster use of hard links (#5543) --- net-misc/openssh/openssh-8.3p1.recipe | 2 +- .../openssh/patches/openssh-8.3p1.patchset | 62 ++++++++++++++----- 2 files changed, 49 insertions(+), 15 deletions(-) diff --git a/net-misc/openssh/openssh-8.3p1.recipe b/net-misc/openssh/openssh-8.3p1.recipe index b18449129..e69ad0f36 100644 --- a/net-misc/openssh/openssh-8.3p1.recipe +++ b/net-misc/openssh/openssh-8.3p1.recipe @@ -16,7 +16,7 @@ ssh-keyscan, ssh-keygen and sftp-server." HOMEPAGE="http://www.openssh.com/" COPYRIGHT="2005-2020 Tatu Ylonen et al." LICENSE="OpenSSH" -REVISION="2" +REVISION="3" SOURCE_URI="https://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-$portVersion.tar.gz" CHECKSUM_SHA256="f2befbe0472fe7eb75d23340eb17531cb6b3aac24075e2066b41f814e12387b2" PATCHES="openssh-$portVersion.patchset" diff --git a/net-misc/openssh/patches/openssh-8.3p1.patchset b/net-misc/openssh/patches/openssh-8.3p1.patchset index 0817bed49..dd538a85a 100644 --- a/net-misc/openssh/patches/openssh-8.3p1.patchset +++ b/net-misc/openssh/patches/openssh-8.3p1.patchset @@ -1,4 +1,4 @@ -From bfd521c1af53563cc95c78920836d5ce9aab36ca Mon Sep 17 00:00:00 2001 +From 5c54fdbdd2ac25b8929558b52ada84f77448d268 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 16 Jul 2020 17:57:38 +0200 Subject: applying patch sshd_config.patch @@ -18,10 +18,10 @@ index 19b7c91..fcea4fb 100644 #AuthorizedPrincipalsFile none -- -2.27.0 +2.28.0 -From 857f451eaaf9e9c4f548da1b385a9239d90093d9 Mon Sep 17 00:00:00 2001 +From b91416657bd89d61f9ee331b43780d9209510b74 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 16 Jul 2020 17:57:38 +0200 Subject: applying patch pathnames.patch @@ -41,10 +41,10 @@ index f7ca5a7..828e43e 100644 /* * Per-user file containing host keys of known hosts. This file need not be -- -2.27.0 +2.28.0 -From 34a94948906168e298d1800ab02d6e5c17212eee Mon Sep 17 00:00:00 2001 +From 750453a296b3811f350b54a0b45f008aa3722603 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 16 Jul 2020 17:57:38 +0200 Subject: applying patch bzero.patch @@ -89,10 +89,10 @@ index 6ef9825..e03a569 100644 #endif /* HAVE_EXPLICIT_BZERO */ -- -2.27.0 +2.28.0 -From 3e5142f762f7774af14448c5c81a3cc3b1a226f5 Mon Sep 17 00:00:00 2001 +From 5dc4f3dbf40155bffe32be4a2425e2abc5684f86 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 16 Jul 2020 17:57:38 +0200 Subject: applying patch ssh-copy-id.patch @@ -125,10 +125,10 @@ index b83b836..f468018 printf '%s: ERROR: mktemp failed\n' "$0" >&2 exit 1 -- -2.27.0 +2.28.0 -From 8de2c264738ae83e549f25b7af75deeeb074c9e3 Mon Sep 17 00:00:00 2001 +From 5f0e6cca436f574cb001ad4e8a2c92b2f3535606 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 16 Jul 2020 17:57:38 +0200 Subject: applying patch sha2-gcc2-build-fix.patch @@ -181,10 +181,10 @@ index e36cc24..235d279 100644 memcpy(digest, context->state.st64, SHA384_DIGEST_LENGTH); #endif -- -2.27.0 +2.28.0 -From 1dd835d3871f67cd9a32fbe28aaabaa968550161 Mon Sep 17 00:00:00 2001 +From 67a8f38df51c835b5ffeb0388be1f7dc75bd4edf Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 16 Jul 2020 17:57:38 +0200 Subject: applying patch pkcs11-gcc2-build-fix.patch @@ -211,10 +211,10 @@ index 8a0ffef..cd75bf2 100644 if ((helper_rsa = RSA_meth_dup(RSA_get_default_method())) == NULL) -- -2.27.0 +2.28.0 -From bd350747310617de68e3e64d52558466cb4c9265 Mon Sep 17 00:00:00 2001 +From b695cb696432a7114e6f64dc90dda023eb587ac8 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 16 Jul 2020 18:08:27 +0200 Subject: Fix configuration path in manpages @@ -1021,5 +1021,39 @@ index b294efc..10f843b 100644 and .Nm -- -2.27.0 +2.28.0 + + +From ea8897df15222daf9e972f98c5c7c0d225224fbe Mon Sep 17 00:00:00 2001 +From: Zach Dykstra +Date: Sun, 27 Dec 2020 21:38:07 -0600 +Subject: mux.c: use rename instead of unsupported hard link + + +diff --git a/mux.c b/mux.c +index fb31ad4..84d104f 100644 +--- a/mux.c ++++ b/mux.c +@@ -1340,9 +1340,9 @@ muxserver_listen(struct ssh *ssh) + } + + /* Now atomically "move" the mux socket into position */ +- if (link(options.control_path, orig_control_path) != 0) { ++ if (rename(options.control_path, orig_control_path) != 0) { + if (errno != EEXIST) { +- fatal("%s: link mux listener %s => %s: %s", __func__, ++ fatal("%s: rename mux listener %s => %s: %s", __func__, + options.control_path, orig_control_path, + strerror(errno)); + } +@@ -1351,7 +1351,6 @@ muxserver_listen(struct ssh *ssh) + unlink(options.control_path); + goto disable_mux_master; + } +- unlink(options.control_path); + free(options.control_path); + options.control_path = orig_control_path; + +-- +2.28.0