1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:47:35 +00:00

Ports: Update dropbear's patches to use git patches

This commit is contained in:
Ali Mohammad Pur 2022-05-17 21:05:51 +04:30 committed by Ali Mohammad Pur
parent 5f986a91c6
commit a4c404ea9c
8 changed files with 127 additions and 29 deletions

View file

@ -1,3 +1,13 @@
From 828399ef58c44dfe248c46bd3e7cadfcb904c5cd Mon Sep 17 00:00:00 2001
From: Patrick Meyer <git@the-space.agency>
Date: Thu, 28 Apr 2022 01:50:11 +0000
Subject: [PATCH 1/5] Disable some default options
Co-Authored-By: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
---
default_options.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/default_options.h b/default_options.h
index 536f4e7..5073b7c 100644
--- a/default_options.h
@ -22,3 +32,6 @@ index 536f4e7..5073b7c 100644
/* Note: PAM auth is quite simple and only works for PAM modules which just do
* a simple "Login: " "Password: " (you can edit the strings in svr-authpam.c).
--
2.36.1

View file

@ -1,5 +1,14 @@
I patch both configure.ac and configure itself (though only configure is required for the build)
Serenity's GCC doesn't support SSP, so this is disabled.
From 634f30f41971933508832954c142cc6c384d19ed Mon Sep 17 00:00:00 2001
From: Patrick Meyer <git@the-space.agency>
Date: Thu, 28 Apr 2022 01:50:11 +0000
Subject: [PATCH 2/5] Disable SSP
Co-Authored-By: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
---
configure | 46 ----------------------------------------------
configure.ac | 17 +----------------
2 files changed, 1 insertion(+), 62 deletions(-)
diff --git a/configure b/configure
index 8374714..8c9eb9a 100755
--- a/configure
@ -86,3 +95,6 @@ index 6a19479..28cd987 100644
# FORTIFY_SOURCE
DB_TRYADDCFLAGS([-D_FORTIFY_SOURCE=2])
--
2.36.1

View file

@ -0,0 +1,25 @@
From 6515921fcacaa71f666963a8ef8a8b3c0ad64eb2 Mon Sep 17 00:00:00 2001
From: Patrick Meyer <git@the-space.agency>
Date: Thu, 28 Apr 2022 01:50:11 +0000
Subject: [PATCH 3/5] Include <sys/select.h>
Co-Authored-By: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
---
includes.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/includes.h b/includes.h
index 1e00002..2208f94 100644
--- a/includes.h
+++ b/includes.h
@@ -37,6 +37,7 @@
#include <sys/un.h>
#include <sys/wait.h>
#include <sys/resource.h>
+#include <sys/select.h>
#include <stdio.h>
#include <errno.h>
--
2.36.1

View file

@ -0,0 +1,28 @@
From 06371c6e143c43c31070a80d8d717e3213316296 Mon Sep 17 00:00:00 2001
From: Patrick Meyer <git@the-space.agency>
Date: Thu, 28 Apr 2022 01:50:11 +0000
Subject: [PATCH 4/5] Install in bindir
FIXME: Not sure what this is exactly doing.
Co-Authored-By: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index e824491..f30f508 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -97,7 +97,7 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir = @datarootdir@
bindir=@bindir@
-sbindir=@sbindir@
+sbindir=$(bindir)
mandir=@mandir@
.DELETE_ON_ERROR:
--
2.36.1

View file

@ -1,3 +1,13 @@
From bc87404dcffad4d0e1577bf407a0bfbacb2d79f2 Mon Sep 17 00:00:00 2001
From: Patrick Meyer <git@the-space.agency>
Date: Thu, 28 Apr 2022 01:50:11 +0000
Subject: [PATCH 5/5] Remove some unsupported socket operations
Co-Authored-By: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
---
netio.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/netio.c b/netio.c
index 2ed9bb1..e0e9962 100644
--- a/netio.c
@ -42,3 +52,6 @@ index 2ed9bb1..e0e9962 100644
#if defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY)
if (res->ai_family == AF_INET6) {
--
2.36.1

View file

@ -0,0 +1,34 @@
# Patches for dropbear on SerenityOS
## `0001-Disable-some-default-options.patch`
Disable some default options
## `0002-Disable-SSP.patch`
Disable SSP
## `0003-Include-sys-select.h.patch`
Include <sys/select.h>
## `0004-Install-in-bindir.patch`
Install in bindir
FIXME: Not sure what this is exactly doing.
## `0005-Remove-some-unsupported-socket-operations.patch`
Remove some unsupported socket operations

View file

@ -1,13 +0,0 @@
Not sure why this is missing, but okay.
diff --git a/includes.h b/includes.h
index 1e00002..2208f94 100644
--- a/includes.h
+++ b/includes.h
@@ -37,6 +37,7 @@
#include <sys/un.h>
#include <sys/wait.h>
#include <sys/resource.h>
+#include <sys/select.h>
#include <stdio.h>
#include <errno.h>

View file

@ -1,14 +0,0 @@
Serenity doesn't use /sbin.
diff --git a/Makefile.in b/Makefile.in
index e824491..f30f508 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -97,7 +97,7 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir = @datarootdir@
bindir=@bindir@
-sbindir=@sbindir@
+sbindir=$(bindir)
mandir=@mandir@
.DELETE_ON_ERROR: