summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2022-05-17 21:25:36 +0430
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2022-05-19 20:17:10 +0430
commit6e5509183f1b183d899cce9079f6d63a9e0e5e6d (patch)
treebed167d6f023e4e9e9194a6cc17e6c3939b27de4
parent7077ce777964f931008c8e02979f19a609770110 (diff)
downloadserenity-6e5509183f1b183d899cce9079f6d63a9e0e5e6d.zip
Ports: Update openssh's patches to use git patches
-rw-r--r--Ports/openssh/patches/0001-ifdef-out-missing-functionality.patch (renamed from Ports/openssh/patches/missing_functionality.patch)40
-rw-r--r--Ports/openssh/patches/0002-Add-a-missing-stdio.h-include.patch27
-rw-r--r--Ports/openssh/patches/0003-Fix-pledges-to-conform-to-serenity-s-pledge.patch (renamed from Ports/openssh/patches/pledge.patch)15
-rw-r--r--Ports/openssh/patches/0004-Remove-inet_aton-redefinition.patch (renamed from Ports/openssh/patches/remove_inet_aton_redef.patch)15
-rw-r--r--Ports/openssh/patches/0005-Assume-SSH-2.0-and-sidestep-some-scanf-issues.patch (renamed from Ports/openssh/patches/scanf_assume_ssh20.patch)14
-rw-r--r--Ports/openssh/patches/0006-Use-sendfd-recvfd-on-serenity.patch (renamed from Ports/openssh/patches/scm-rights.patch)15
-rw-r--r--Ports/openssh/patches/0007-Use-unveil-for-privsep.patch (renamed from Ports/openssh/patches/unveil_privsep.patch)12
-rw-r--r--Ports/openssh/patches/ReadMe.md44
-rw-r--r--Ports/openssh/patches/missing_stdio.patch16
9 files changed, 177 insertions, 21 deletions
diff --git a/Ports/openssh/patches/missing_functionality.patch b/Ports/openssh/patches/0001-ifdef-out-missing-functionality.patch
index 70b1e77044..b692b690e1 100644
--- a/Ports/openssh/patches/missing_functionality.patch
+++ b/Ports/openssh/patches/0001-ifdef-out-missing-functionality.patch
@@ -1,4 +1,39 @@
-Ifdef out unimplemented functionality
+From 0eca70393610857e0a87f157698b295bd727dcae Mon Sep 17 00:00:00 2001
+From: Gunnar Beutner <gbeutner@serenityos.org>
+Date: Sat, 30 Apr 2022 10:58:10 +0000
+Subject: [PATCH 1/7] ifdef out missing functionality
+
+Co-Authored-By: Luke <luke.wilde@live.co.uk>
+Co-Authored-By: Patrick Meyer <git@the-space.agency>
+Co-Authored-By: Tim Schumacher <timschumi@gmx.de>
+---
+ atomicio.c | 2 +-
+ defines.h | 5 +++++
+ dns.c | 4 ++++
+ dns.h | 4 ++++
+ hostfile.c | 2 ++
+ includes.h | 2 ++
+ loginrec.c | 8 ++++----
+ misc.c | 2 ++
+ openbsd-compat/getrrsetbyname-ldns.c | 4 ++++
+ openbsd-compat/getrrsetbyname.c | 4 ++++
+ openbsd-compat/getrrsetbyname.h | 4 ++++
+ openbsd-compat/mktemp.c | 2 +-
+ readconf.c | 5 ++++-
+ regress/netcat.c | 2 ++
+ sandbox-pledge.c | 2 ++
+ servconf.c | 2 ++
+ ssh-add.c | 4 ++++
+ ssh-agent.c | 2 ++
+ ssh-keygen.c | 11 +++++++++++
+ ssh-keyscan.c | 2 ++
+ ssh-pkcs11-client.c | 8 +++++++-
+ ssh-sk-client.c | 4 ++++
+ sshbuf-misc.c | 2 ++
+ sshconnect.c | 10 ++++++++--
+ sshkey.c | 4 ++++
+ 25 files changed, 91 insertions(+), 10 deletions(-)
+
diff --git a/atomicio.c b/atomicio.c
index 7650733..7a195f5 100644
--- a/atomicio.c
@@ -590,3 +625,6 @@ index f1e9200..564ff40 100644
#ifdef WITH_XMSS
case KEY_XMSS:
case KEY_XMSS_CERT:
+--
+2.36.1
+
diff --git a/Ports/openssh/patches/0002-Add-a-missing-stdio.h-include.patch b/Ports/openssh/patches/0002-Add-a-missing-stdio.h-include.patch
new file mode 100644
index 0000000000..d1b2f9f8e6
--- /dev/null
+++ b/Ports/openssh/patches/0002-Add-a-missing-stdio.h-include.patch
@@ -0,0 +1,27 @@
+From 352c627e3896ed1305826a1fa2ece85a70e66fd7 Mon Sep 17 00:00:00 2001
+From: Luke <luke.wilde@live.co.uk>
+Date: Sat, 26 Sep 2020 08:12:27 -0700
+Subject: [PATCH 2/7] Add a missing stdio.h include
+
+---
+ openbsd-compat/bsd-flock.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/openbsd-compat/bsd-flock.c b/openbsd-compat/bsd-flock.c
+index 9b15d1e..bf57389 100644
+--- a/openbsd-compat/bsd-flock.c
++++ b/openbsd-compat/bsd-flock.c
+@@ -40,6 +40,10 @@
+ #include <errno.h>
+ #include <fcntl.h>
+
++#ifdef __serenity__
++#include <stdio.h>
++#endif
++
+ int
+ flock(int fd, int op)
+ {
+--
+2.36.1
+
diff --git a/Ports/openssh/patches/pledge.patch b/Ports/openssh/patches/0003-Fix-pledges-to-conform-to-serenity-s-pledge.patch
index 0818c54499..955e05662e 100644
--- a/Ports/openssh/patches/pledge.patch
+++ b/Ports/openssh/patches/0003-Fix-pledges-to-conform-to-serenity-s-pledge.patch
@@ -1,4 +1,14 @@
-Add missing sigaction pledges and remove dns
+From fc2d9a37e6b20ed4544fcb53c25bd34c1c3f2249 Mon Sep 17 00:00:00 2001
+From: Gunnar Beutner <gbeutner@serenityos.org>
+Date: Sat, 30 Apr 2022 10:58:10 +0000
+Subject: [PATCH 3/7] Fix pledges to conform to serenity's pledge()
+
+Co-Authored-By: Patrick Meyer <git@the-space.agency>
+---
+ clientloop.c | 10 +++++-----
+ ssh-keysign.c | 4 ++--
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
diff --git a/clientloop.c b/clientloop.c
index f8350e6..00bf4b6 100644
--- a/clientloop.c
@@ -62,3 +72,6 @@ index c52321e..9ae4dbf 100644
fatal("%s: pledge: %s", __progname, strerror(errno));
for (i = found = 0; i < NUM_KEYTYPES; i++) {
+--
+2.36.1
+
diff --git a/Ports/openssh/patches/remove_inet_aton_redef.patch b/Ports/openssh/patches/0004-Remove-inet_aton-redefinition.patch
index 7a09f0d134..b0c239168d 100644
--- a/Ports/openssh/patches/remove_inet_aton_redef.patch
+++ b/Ports/openssh/patches/0004-Remove-inet_aton-redefinition.patch
@@ -1,4 +1,14 @@
-Remove inet_aton redefinition
+From 5f5cc486c5de5e03aa2397431e881e356f94724f Mon Sep 17 00:00:00 2001
+From: Luke <luke.wilde@live.co.uk>
+Date: Sat, 30 Apr 2022 10:58:10 +0000
+Subject: [PATCH 4/7] Remove inet_aton() redefinition
+
+Co-Authored-By: Patrick Meyer <git@the-space.agency>
+---
+ openbsd-compat/inet_aton.c | 172 ++++++++++++++++----------------
+ openbsd-compat/openbsd-compat.h | 2 +-
+ 2 files changed, 87 insertions(+), 87 deletions(-)
+
diff --git a/openbsd-compat/inet_aton.c b/openbsd-compat/inet_aton.c
index 5efcc5f..14aa47b 100644
--- a/openbsd-compat/inet_aton.c
@@ -207,3 +217,6 @@ index 4316ab8..1c5c338 100644
int inet_aton(const char *cp, struct in_addr *addr);
#endif
+--
+2.36.1
+
diff --git a/Ports/openssh/patches/scanf_assume_ssh20.patch b/Ports/openssh/patches/0005-Assume-SSH-2.0-and-sidestep-some-scanf-issues.patch
index ebcdf33510..9f478b7f83 100644
--- a/Ports/openssh/patches/scanf_assume_ssh20.patch
+++ b/Ports/openssh/patches/0005-Assume-SSH-2.0-and-sidestep-some-scanf-issues.patch
@@ -1,4 +1,13 @@
-%.100s and sscanf doesn't work as expected
+From e7f883a58ee451a086a5f6262cbad323f3af6023 Mon Sep 17 00:00:00 2001
+From: Luke <luke.wilde@live.co.uk>
+Date: Sat, 30 Apr 2022 10:58:10 +0000
+Subject: [PATCH 5/7] Assume SSH 2.0 and sidestep some scanf issues
+
+Co-Authored-By: Patrick Meyer <git@the-space.agency>
+---
+ kex.c | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
diff --git a/kex.c b/kex.c
index 0bcd27d..2539cc2 100644
--- a/kex.c
@@ -49,3 +58,6 @@ index 0bcd27d..2539cc2 100644
debug("Remote protocol version %d.%d, remote software version %.100s",
remote_major, remote_minor, remote_version);
compat_banner(ssh, remote_version);
+--
+2.36.1
+
diff --git a/Ports/openssh/patches/scm-rights.patch b/Ports/openssh/patches/0006-Use-sendfd-recvfd-on-serenity.patch
index 47728f4eaf..0afa6c910f 100644
--- a/Ports/openssh/patches/scm-rights.patch
+++ b/Ports/openssh/patches/0006-Use-sendfd-recvfd-on-serenity.patch
@@ -1,5 +1,15 @@
+From 80b391147785edcbf2e1267104e24087ffb420df Mon Sep 17 00:00:00 2001
+From: Gunnar Beutner <gbeutner@serenityos.org>
+Date: Sat, 30 Apr 2022 10:58:10 +0000
+Subject: [PATCH 6/7] Use sendfd/recvfd on serenity
+
+Co-Authored-By: Patrick Meyer <git@the-space.agency>
+---
+ monitor_fdpass.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
-index a07727a..0a9fe75 100644
+index a07727a..ad6774e 100644
--- a/monitor_fdpass.c
+++ b/monitor_fdpass.c
@@ -51,6 +51,7 @@
@@ -34,3 +44,6 @@ index a07727a..0a9fe75 100644
+ return recvfd(sock, 0);
+#endif
}
+--
+2.36.1
+
diff --git a/Ports/openssh/patches/unveil_privsep.patch b/Ports/openssh/patches/0007-Use-unveil-for-privsep.patch
index 675f6c5f69..e1070a3cf4 100644
--- a/Ports/openssh/patches/unveil_privsep.patch
+++ b/Ports/openssh/patches/0007-Use-unveil-for-privsep.patch
@@ -1,3 +1,12 @@
+From ba3aaa65905f77e6e8bb812ca0ddcdba4f3c0eb3 Mon Sep 17 00:00:00 2001
+From: Patrick Meyer <git@the-space.agency>
+Date: Sat, 30 Apr 2022 10:58:10 +0000
+Subject: [PATCH 7/7] Use unveil for privsep
+
+---
+ sshd.c | 28 +++-------------------------
+ 1 file changed, 3 insertions(+), 25 deletions(-)
+
diff --git a/sshd.c b/sshd.c
index 0ee65b5..e2f84de 100644
--- a/sshd.c
@@ -44,3 +53,6 @@ index 0ee65b5..e2f84de 100644
if (test_flag > 1) {
/*
* If no connection info was provided by -C then use
+--
+2.36.1
+
diff --git a/Ports/openssh/patches/ReadMe.md b/Ports/openssh/patches/ReadMe.md
new file mode 100644
index 0000000000..fd32fa438b
--- /dev/null
+++ b/Ports/openssh/patches/ReadMe.md
@@ -0,0 +1,44 @@
+# Patches for openssh on SerenityOS
+
+## `0001-ifdef-out-missing-functionality.patch`
+
+ifdef out missing functionality
+
+
+
+
+
+## `0002-Add-a-missing-stdio.h-include.patch`
+
+Add a missing stdio.h include
+
+
+## `0003-Fix-pledges-to-conform-to-serenity-s-pledge.patch`
+
+Fix pledges to conform to serenity's pledge()
+
+
+
+## `0004-Remove-inet_aton-redefinition.patch`
+
+Remove inet_aton() redefinition
+
+
+
+## `0005-Assume-SSH-2.0-and-sidestep-some-scanf-issues.patch`
+
+Assume SSH 2.0 and sidestep some scanf issues
+
+
+
+## `0006-Use-sendfd-recvfd-on-serenity.patch`
+
+Use sendfd/recvfd on serenity
+
+
+
+## `0007-Use-unveil-for-privsep.patch`
+
+Use unveil for privsep
+
+
diff --git a/Ports/openssh/patches/missing_stdio.patch b/Ports/openssh/patches/missing_stdio.patch
deleted file mode 100644
index 7a2ca5a618..0000000000
--- a/Ports/openssh/patches/missing_stdio.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-87fc789d2db19db2a65cbf45b53afde5722ad1af Add missing stdio include in bsd-flock
-diff --git a/openbsd-compat/bsd-flock.c b/openbsd-compat/bsd-flock.c
-index 9b15d1ea..bf57389a 100644
---- a/openbsd-compat/bsd-flock.c
-+++ b/openbsd-compat/bsd-flock.c
-@@ -40,6 +40,10 @@
- #include <errno.h>
- #include <fcntl.h>
-
-+#ifdef __serenity__
-+#include <stdio.h>
-+#endif
-+
- int
- flock(int fd, int op)
- {