diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-04-28 12:39:12 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-28 14:19:45 +0200 |
commit | aa792062cbb0d39092948a7e71fad59737c4ac66 (patch) | |
tree | 09ff716195ccdaa7771f7188d2c9c77fd2183946 /Ports/openssh | |
parent | c841012f569dba4fa72e9eb8989bb847be4535bc (diff) | |
download | serenity-aa792062cbb0d39092948a7e71fad59737c4ac66.zip |
Kernel+LibC: Implement the socketpair() syscall
Diffstat (limited to 'Ports/openssh')
-rw-r--r-- | Ports/openssh/patches/missing_functionality.patch | 36 | ||||
-rw-r--r-- | Ports/openssh/patches/sftp_pipes.patch | 16 |
2 files changed, 0 insertions, 52 deletions
diff --git a/Ports/openssh/patches/missing_functionality.patch b/Ports/openssh/patches/missing_functionality.patch index e4ba95fe6d..5c7cecf808 100644 --- a/Ports/openssh/patches/missing_functionality.patch +++ b/Ports/openssh/patches/missing_functionality.patch @@ -150,21 +150,6 @@ index 554ceb0b..67464ef2 100644 #include <netinet/ip.h> #include <netinet/tcp.h> #include <arpa/inet.h> -diff --git a/monitor.c b/monitor.c -index b6e855d5..bde8f383 100644 ---- a/monitor.c -+++ b/monitor.c -@@ -1752,8 +1752,10 @@ monitor_openfds(struct monitor *mon, int do_logfds) - int on = 1; - #endif - -+#ifndef __serenity__ - if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) - fatal("%s: socketpair: %s", __func__, strerror(errno)); -+#endif - #ifdef SO_ZEROIZE - if (setsockopt(pair[0], SOL_SOCKET, SO_ZEROIZE, &on, sizeof(on)) == -1) - error("setsockopt SO_ZEROIZE(0): %.100s", strerror(errno)); diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index 059b6d3b..2a248c81 100644 --- a/openbsd-compat/bsd-misc.c @@ -588,27 +573,6 @@ index af08be41..9e748a23 100644 r = check_host_key(host, hostaddr, options.port, host_key, RDRW, options.user_hostfiles, options.num_user_hostfiles, options.system_hostfiles, options.num_system_hostfiles); -diff --git a/sshd.c b/sshd.c -index 6f8f11a3..1ecf3e32 100644 ---- a/sshd.c -+++ b/sshd.c -@@ -1231,6 +1231,8 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s) - continue; - } - -+// FIXME: socketpair is seemingly required for SSHD to work, but doesn't current exist. -+#ifndef __serenity__ - if (rexec_flag && socketpair(AF_UNIX, - SOCK_STREAM, 0, config_s) == -1) { - error("reexec socketpair: %s", -@@ -1240,6 +1242,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s) - close(startup_p[1]); - continue; - } -+#endif - - for (j = 0; j < options.max_startups; j++) - if (startup_pipes[j] == -1) { diff --git a/sshkey.c b/sshkey.c index 1571e3d9..2b5c611c 100644 --- a/sshkey.c diff --git a/Ports/openssh/patches/sftp_pipes.patch b/Ports/openssh/patches/sftp_pipes.patch deleted file mode 100644 index 10838cdc9d..0000000000 --- a/Ports/openssh/patches/sftp_pipes.patch +++ /dev/null @@ -1,16 +0,0 @@ -e5a0b5cc530260b1ee94105e8c989ba21856b4a2 Use pipes instead of socketpair in SFTP -diff --git a/sftp.c b/sftp.c -index 2799e4a1..9ce7055a 100644 ---- a/sftp.c -+++ b/sftp.c -@@ -2296,6 +2296,10 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2) - return (err >= 0 ? 0 : -1); - } - -+#ifdef __serenity__ -+#define USE_PIPES 1 -+#endif -+ - static void - connect_to_server(char *path, char **args, int *in, int *out) - { |