We ended up going with socat forwarding VSOCK to unix inside guests, so these patches are no longer necessary. Signed-off-by: Alyssa Ross <hi@alyssa.is> --- ...add-vsock-address-format-to-the-spec.patch | 97 ------- ...02-build-sys-add-enable-vsock-option.patch | 55 ---- ...upport-to-_dbus_append_address_from_.patch | 68 ----- .../0004-dbus-add-_dbus_listen_vsock.patch | 190 ------------- .../0005-dbus-add-vsock-server-support.patch | 139 ---------- .../0006-dbus-add-_dbus_connect_vsock.patch | 93 ------- .../0007-dbus-add-vsock-client-support.patch | 117 -------- ...-test-add-simple-loopback-vsock-test.patch | 127 --------- ...dd-allow-CIDs.-on-listenable-address.patch | 255 ------------------ pkgs/dbus/default.nix | 25 -- pkgs/overlay.nix | 2 - 11 files changed, 1168 deletions(-) delete mode 100644 pkgs/dbus/0001-doc-add-vsock-address-format-to-the-spec.patch delete mode 100644 pkgs/dbus/0002-build-sys-add-enable-vsock-option.patch delete mode 100644 pkgs/dbus/0003-unix-add-vsock-support-to-_dbus_append_address_from_.patch delete mode 100644 pkgs/dbus/0004-dbus-add-_dbus_listen_vsock.patch delete mode 100644 pkgs/dbus/0005-dbus-add-vsock-server-support.patch delete mode 100644 pkgs/dbus/0006-dbus-add-_dbus_connect_vsock.patch delete mode 100644 pkgs/dbus/0007-dbus-add-vsock-client-support.patch delete mode 100644 pkgs/dbus/0008-test-add-simple-loopback-vsock-test.patch delete mode 100644 pkgs/dbus/0009-vsock-add-allow-CIDs.-on-listenable-address.patch delete mode 100644 pkgs/dbus/default.nix diff --git a/pkgs/dbus/0001-doc-add-vsock-address-format-to-the-spec.patch b/pkgs/dbus/0001-doc-add-vsock-address-format-to-the-spec.patch deleted file mode 100644 index 017ed0b..0000000 --- a/pkgs/dbus/0001-doc-add-vsock-address-format-to-the-spec.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 1b2bf09fbd4a6fadaf2438d0bc99f08e5c38b764 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> -Date: Sun, 10 Jan 2021 01:14:18 +0400 -Subject: [PATCH 1/9] doc: add vsock: address format to the spec -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later -SPDX-FileCopyrightText: The D-Bus Authors - -Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> ---- - doc/dbus-specification.xml | 61 +++++++++++++++++++++++++++++++++++++- - 1 file changed, 60 insertions(+), 1 deletion(-) - -diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml -index 16bbc2ca..775928c0 100644 ---- a/doc/dbus-specification.xml -+++ b/doc/dbus-specification.xml -@@ -3576,7 +3576,7 @@ - [FIXME we need to specify in detail each transport and its possible arguments] - - Current transports include: unix domain sockets (including -- abstract namespace on linux), launchd, systemd, TCP/IP, an executed subprocess and a debug/testing transport -+ abstract namespace on linux), launchd, systemd, TCP/IP, VSOCK, an executed subprocess and a debug/testing transport - using in-process pipes. Future possible transports include one that - tunnels over X11 protocol. - </para> -@@ -3686,6 +3686,65 @@ - </para> - </sect3> - </sect2> -+ <sect2 id="transports-vsock"> -+ <title>VSOCK Sockets</title> -+ <para> -+ VSOCK sockets facilitates communication between virtual machines and the -+ host they are running on. It is supported on various operating systems, -+ although it is most common on Linux (support added in 3.9 for VMWare, -+ 4.8 for KVM, 4.14 for Hyper-V). -+ </para> -+ <para> -+ VSOCK addresses do not need to specify the CID or the port to be -+ listenable. By default, they will use -+ <literal>VMADDR_CID_ANY(-1)</literal> and -+ <literal>VMADDR_PORT_ANY(-1)</literal>, which will bind any address or -+ port available. -+ </para> -+ <para> -+ To be connectable, a VSOCK address must specify both the CID and the port. -+ </para> -+ <sect3 id="transport-vsock-addresses"> -+ <title>Server Address Format</title> -+ <para> -+ VSOCK socket addresses are identified by the "vsock:" prefix -+ and support the following key/value pairs: -+ </para> -+ <informaltable> -+ <tgroup cols="3"> -+ <thead> -+ <row> -+ <entry>Name</entry> -+ <entry>Values</entry> -+ <entry>Description</entry> -+ </row> -+ </thead> -+ <tbody> -+ <row> -+ <entry>cid</entry> -+ <entry>(32 bits unsigned number)</entry> -+ <entry> -+ The Context Identifier (CID). 0 is reserved for services -+ built into the hypervisor, 1 is the well-known address for local -+ communication, 2 is the well-known address of the host. -+ -1U means any address for binding. -+ </entry> -+ </row> -+ <row> -+ <entry>port</entry> -+ <entry>(32 bits unsigned number)</entry> -+ <entry> -+ The port number. -1U means any port for binding. On Linux, the -+ port numbers below 1024 are called privileged ports. Only a -+ process with the CAP_NET_BIND_SERVICE capability may bind to these -+ port numbers. -+ </entry> -+ </row> -+ </tbody> -+ </tgroup> -+ </informaltable> -+ </sect3> -+ </sect2> - <sect2 id="transports-launchd"> - <title>launchd</title> - <para> --- -2.42.0 - diff --git a/pkgs/dbus/0002-build-sys-add-enable-vsock-option.patch b/pkgs/dbus/0002-build-sys-add-enable-vsock-option.patch deleted file mode 100644 index 32ac0d5..0000000 --- a/pkgs/dbus/0002-build-sys-add-enable-vsock-option.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 5b47ee683887c23c0f56cf403f46be1ad8f04470 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> -Date: Fri, 8 Jan 2021 15:37:54 +0400 -Subject: [PATCH 2/9] build-sys: add --enable-vsock option -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later -SPDX-FileCopyrightText: The D-Bus Authors - -Disabled by default, mainly for two reasons: -- SELinux support is lacking in kernel, so --disable-selinux is required atm -- Testing in containers/CI has unresolved issues (time out or unreachable) - -Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> ---- - configure.ac | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 3f200a6c..2c3e7f54 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -218,6 +218,7 @@ AC_ARG_ENABLE(console-owner-file, AS_HELP_STRING([--enable-console-owner-file],[ - AC_ARG_ENABLE(launchd, AS_HELP_STRING([--enable-launchd],[build with launchd auto-launch support]),enable_launchd=$enableval,enable_launchd=auto) - AC_ARG_ENABLE(systemd, AS_HELP_STRING([--enable-systemd],[build with systemd at_console support]),enable_systemd=$enableval,enable_systemd=auto) - AC_ARG_ENABLE(traditional-activation, AS_HELP_STRING([--disable-traditional-activation], [Do not build support for service activation without using SystemdService]), enable_traditional_activation="$enableval", enable_traditional_activation=yes) -+AC_ARG_ENABLE([vsock], [AS_HELP_STRING([--enable-vsock],[build with vsock support (linux only)])], [enable_vsock=$enableval], [enable_vsock=no]) - - AC_ARG_WITH(session-socket-dir, AS_HELP_STRING([--with-session-socket-dir=[dirname]],[Where to put sockets for the per-login-session message bus])) - AC_ARG_WITH(test-socket-dir, AS_HELP_STRING([--with-test-socket-dir=[dirname]],[Where to put sockets for make check])) -@@ -882,6 +883,12 @@ fi - - AM_CONDITIONAL(DBUS_BUS_ENABLE_INOTIFY, test x$have_inotify = xyes) - -+AS_IF([test "x$enable_vsock" = xno], -+ [have_vsock=no], -+ [AC_CHECK_HEADERS([linux/vm_sockets.h], [have_vsock=yes], [have_vsock=no], [#include <sys/socket.h>])]) -+AS_IF([test "x$have_vsock" = xyes], -+ [AC_DEFINE([DBUS_ENABLE_VSOCK], [1], [Use vsock])]) -+ - # For simplicity, we require the userland API for epoll_create1 at - # compile-time (glibc 2.9), but we'll run on kernels that turn out - # not to have it at runtime. -@@ -1796,6 +1803,7 @@ echo " - Building inotify support: ${have_inotify} - Building kqueue support: ${have_kqueue} - Building systemd support: ${have_systemd} -+ Building vsock support: ${have_vsock} - Traditional activation: ${enable_traditional_activation} - Building X11 code: ${have_x11} - Building Doxygen docs: ${enable_doxygen_docs} --- -2.42.0 - diff --git a/pkgs/dbus/0003-unix-add-vsock-support-to-_dbus_append_address_from_.patch b/pkgs/dbus/0003-unix-add-vsock-support-to-_dbus_append_address_from_.patch deleted file mode 100644 index 311667f..0000000 --- a/pkgs/dbus/0003-unix-add-vsock-support-to-_dbus_append_address_from_.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 9c0d476590791451a344e086526826ad5a7821f8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> -Date: Fri, 8 Jan 2021 15:40:01 +0400 -Subject: [PATCH 3/9] unix: add vsock support to - _dbus_append_address_from_socket -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later -SPDX-FileCopyrightText: 2002, 2003, 2006 Red Hat, Inc. -SPDX-FileCopyrightText: 2003 CodeFactory AB -SPDX-FileCopyrightText: The D-Bus Authors - -Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> ---- - dbus/dbus-sysdeps-unix.c | 22 +++++++++++++++++++++- - 1 file changed, 21 insertions(+), 1 deletion(-) - -diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c -index e585136f..cc40c0cd 100644 ---- a/dbus/dbus-sysdeps-unix.c -+++ b/dbus/dbus-sysdeps-unix.c -@@ -89,6 +89,10 @@ - #include <systemd/sd-daemon.h> - #endif - -+#ifdef DBUS_ENABLE_VSOCK -+#include <linux/vm_sockets.h> -+#endif -+ - #if !DBUS_USE_SYNC - #include <pthread.h> - #endif -@@ -4891,6 +4895,9 @@ _dbus_append_address_from_socket (DBusSocket fd, - struct sockaddr_un un; - struct sockaddr_in ipv4; - struct sockaddr_in6 ipv6; -+#ifdef DBUS_ENABLE_VSOCK -+ struct sockaddr_vm vm; -+#endif - } socket; - char hostip[INET6_ADDRSTRLEN]; - socklen_t size = sizeof (socket); -@@ -4962,7 +4969,20 @@ _dbus_append_address_from_socket (DBusSocket fd, - } - /* not reached */ - break; -- -+#ifdef DBUS_ENABLE_VSOCK -+ case AF_VSOCK: -+ if (_dbus_string_append_printf (address, "vsock:cid=%u,port=%u", -+ socket.vm.svm_cid, socket.vm.svm_port)) -+ { -+ return TRUE; -+ } -+ else -+ { -+ _DBUS_SET_OOM (error); -+ return FALSE; -+ } -+ break; -+#endif - default: - dbus_set_error (error, - _dbus_error_from_errno (EINVAL), --- -2.42.0 - diff --git a/pkgs/dbus/0004-dbus-add-_dbus_listen_vsock.patch b/pkgs/dbus/0004-dbus-add-_dbus_listen_vsock.patch deleted file mode 100644 index c9f7cc2..0000000 --- a/pkgs/dbus/0004-dbus-add-_dbus_listen_vsock.patch +++ /dev/null @@ -1,190 +0,0 @@ -From 468b34e34ae36970029d544455df80d767b95296 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> -Date: Sun, 10 Jan 2021 00:42:54 +0400 -Subject: [PATCH 4/9] dbus: add _dbus_listen_vsock -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later -SPDX-FileCopyrightText: 2002, 2003, 2006 Red Hat, Inc. -SPDX-FileCopyrightText: 2003 CodeFactory AB -SPDX-FileCopyrightText: The D-Bus Authors - -Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> ---- - dbus/dbus-sysdeps-unix.c | 140 +++++++++++++++++++++++++++++++++++++++ - dbus/dbus-sysdeps-unix.h | 7 ++ - 2 files changed, 147 insertions(+) - -diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c -index cc40c0cd..9a46625a 100644 ---- a/dbus/dbus-sysdeps-unix.c -+++ b/dbus/dbus-sysdeps-unix.c -@@ -1565,6 +1565,146 @@ out: - return fd; - } - -+#ifdef DBUS_ENABLE_VSOCK -+static dbus_bool_t -+_dbus_vsock_parse_cid (const char *cid, -+ unsigned int *ret, -+ DBusError *error) -+{ -+ DBusString cid_str; -+ unsigned long val; -+ -+ _dbus_string_init_const (&cid_str, cid); -+ -+ if (!_dbus_string_parse_uint (&cid_str, 0, &val, NULL) || val > _DBUS_UINT32_MAX) -+ { -+ dbus_set_error (error, -+ DBUS_ERROR_BAD_ADDRESS, -+ "Failed to parse vsock CID value '%s'", cid); -+ return FALSE; -+ } -+ -+ -+ *ret = val; -+ return TRUE; -+} -+ -+static dbus_bool_t -+_dbus_vsock_parse_port (const char *port, -+ unsigned int *ret, -+ DBusError *error) -+{ -+ DBusString port_str; -+ unsigned long val; -+ -+ _dbus_string_init_const (&port_str, port); -+ -+ if (!_dbus_string_parse_uint (&port_str, 0, &val, NULL) || val > _DBUS_UINT32_MAX) -+ { -+ dbus_set_error (error, -+ DBUS_ERROR_BAD_ADDRESS, -+ "Failed to parse vsock port value '%s'", port); -+ return FALSE; -+ } -+ -+ *ret = val; -+ return TRUE; -+} -+ -+int -+_dbus_listen_vsock (const char *cid, -+ const char *port, -+ DBusString *retcid, -+ DBusString *retport, -+ DBusError *error) -+{ -+ struct sockaddr_vm sa; -+ int saved_errno; -+ int fd = -1; -+ -+ _DBUS_ASSERT_ERROR_IS_CLEAR (error); -+ _DBUS_ZERO (sa); -+ sa.svm_family = AF_VSOCK; -+ sa.svm_cid = VMADDR_CID_ANY; -+ sa.svm_port = VMADDR_PORT_ANY; -+ -+ if ((cid && !_dbus_vsock_parse_cid (cid, &sa.svm_cid, error)) || -+ (port && !_dbus_vsock_parse_port (port, &sa.svm_port, error))) -+ { -+ _DBUS_ASSERT_ERROR_IS_SET (error); -+ return -1; -+ } -+ -+ if (!_dbus_open_socket (&fd, AF_VSOCK, SOCK_STREAM, 0, error)) -+ { -+ _DBUS_ASSERT_ERROR_IS_SET (error); -+ return -1; -+ } -+ -+ if (bind (fd, (struct sockaddr *) &sa, sizeof (sa)) < 0) -+ { -+ saved_errno = errno; -+ _dbus_close (fd, NULL); -+ dbus_set_error (error, _dbus_error_from_errno (saved_errno), -+ "Failed to bind VSOCK socket of CID:%u: port:%u: %s", -+ sa.svm_cid, sa.svm_port, _dbus_strerror (saved_errno)); -+ return -1; -+ } -+ -+ if (!_dbus_set_fd_nonblocking (fd, error)) -+ { -+ _DBUS_ASSERT_ERROR_IS_SET (error); -+ _dbus_close (fd, NULL); -+ return -1; -+ } -+ -+ if (listen (fd, 30 /* backlog */) < 0) -+ { -+ saved_errno = errno; -+ dbus_set_error (error, _dbus_error_from_errno (saved_errno), -+ "Failed to listen on VSOCK socket of CID:%u port:%u: %s", -+ sa.svm_cid, sa.svm_port, _dbus_strerror (saved_errno)); -+ _dbus_close (fd, NULL); -+ return -1; -+ } -+ -+ if (!port || !cid) -+ { -+ int result; -+ socklen_t addrlen; -+ -+ addrlen = sizeof (sa); -+ result = getsockname (fd, (struct sockaddr *) &sa, &addrlen); -+ -+ if (result == -1) -+ { -+ saved_errno = errno; -+ dbus_set_error (error, _dbus_error_from_errno (saved_errno), -+ "Failed to retrieve VSOCK socket name: %s", -+ _dbus_strerror (saved_errno)); -+ _dbus_close (fd, NULL); -+ return -1; -+ } -+ } -+ -+ if (!_dbus_string_append_printf (retcid, "%u", sa.svm_cid)) -+ { -+ dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); -+ _dbus_close (fd, NULL); -+ return -1; -+ } -+ -+ if (!_dbus_string_append_printf (retport, "%u", sa.svm_port)) -+ { -+ dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); -+ _dbus_close (fd, NULL); -+ return -1; -+ } -+ -+ return fd; -+} -+#endif -+ - /** - * Creates a socket and binds it to the given path, then listens on - * the socket. The socket is set to be nonblocking. In case of port=0 -diff --git a/dbus/dbus-sysdeps-unix.h b/dbus/dbus-sysdeps-unix.h -index e86de6d9..49b8f436 100644 ---- a/dbus/dbus-sysdeps-unix.h -+++ b/dbus/dbus-sysdeps-unix.h -@@ -73,6 +73,13 @@ int _dbus_listen_unix_socket (const char *path, - dbus_bool_t abstract, - DBusError *error); - -+int _dbus_listen_vsock (const char *cid, -+ const char *port, -+ DBusString *retcid, -+ DBusString *retport, -+ DBusError *error); -+ -+ - int _dbus_connect_exec (const char *path, - char *const argv[], - DBusError *error); --- -2.42.0 - diff --git a/pkgs/dbus/0005-dbus-add-vsock-server-support.patch b/pkgs/dbus/0005-dbus-add-vsock-server-support.patch deleted file mode 100644 index 04b03b8..0000000 --- a/pkgs/dbus/0005-dbus-add-vsock-server-support.patch +++ /dev/null @@ -1,139 +0,0 @@ -From 1f770dab67ddf78a6c327eebf25086e207a0f6e2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> -Date: Sun, 10 Jan 2021 00:43:20 +0400 -Subject: [PATCH 5/9] dbus: add vsock: server support -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later -SPDX-FileCopyrightText: 2002, 2003, 2004, 2006 Red Hat Inc. -SPDX-FileCopyrightText: The D-Bus Authors - -Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> ---- - dbus/dbus-server-socket.c | 55 +++++++++++++++++++++++++++++++++++++++ - dbus/dbus-server-socket.h | 3 +++ - dbus/dbus-server-unix.c | 20 ++++++++++++++ - 3 files changed, 78 insertions(+) - -diff --git a/dbus/dbus-server-socket.c b/dbus/dbus-server-socket.c -index bc5e3a9d..074b2dfd 100644 ---- a/dbus/dbus-server-socket.c -+++ b/dbus/dbus-server-socket.c -@@ -29,6 +29,10 @@ - #include "dbus-memory.h" - #include "dbus-nonce.h" - #include "dbus-string.h" -+#ifdef DBUS_ENABLE_VSOCK -+#include "dbus-sysdeps.h" -+#include "dbus-sysdeps-unix.h" -+#endif - - /** - * @defgroup DBusServerSocket DBusServer implementations for SOCKET -@@ -395,6 +399,57 @@ failed: - return NULL; - } - -+#ifdef DBUS_ENABLE_VSOCK -+DBusServer * -+_dbus_server_new_for_vsock (const char *cid, -+ const char *port, -+ DBusError *error) -+{ -+ DBusServer *server = NULL; -+ DBusSocket listen_fd = DBUS_SOCKET_INIT; -+ DBusString address = _DBUS_STRING_INIT_INVALID; -+ DBusString cid_str = _DBUS_STRING_INIT_INVALID; -+ DBusString port_str = _DBUS_STRING_INIT_INVALID; -+ -+ _DBUS_ASSERT_ERROR_IS_CLEAR (error); -+ -+ if (!_dbus_string_init (&address) || -+ !_dbus_string_init (&cid_str) || -+ !_dbus_string_init (&port_str)) -+ { -+ dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); -+ goto out; -+ } -+ -+ listen_fd.fd = _dbus_listen_vsock (cid, port, &cid_str, &port_str, error); -+ if (!_dbus_socket_is_valid (listen_fd)) -+ { -+ _DBUS_ASSERT_ERROR_IS_SET (error); -+ goto out; -+ } -+ -+ if (!_dbus_string_append (&address, "vsock:cid=") || -+ !_dbus_string_append (&address, _dbus_string_get_const_data (&cid_str)) || -+ !_dbus_string_append (&address, ",port=") || -+ !_dbus_string_append (&address, _dbus_string_get_const_data (&port_str))) -+ { -+ dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); -+ goto out; -+ } -+ -+ server = _dbus_server_new_for_socket (&listen_fd, 1, &address, NULL, error); -+ if (server) -+ _dbus_socket_invalidate (&listen_fd); -+ -+out: -+ _dbus_close_socket (listen_fd, NULL); -+ _dbus_string_free (&cid_str); -+ _dbus_string_free (&port_str); -+ _dbus_string_free (&address); -+ return server; -+} -+#endif -+ - /** - * Creates a new server listening on TCP. - * If host is NULL, it will default to localhost. -diff --git a/dbus/dbus-server-socket.h b/dbus/dbus-server-socket.h -index ee5bf45f..d2461148 100644 ---- a/dbus/dbus-server-socket.h -+++ b/dbus/dbus-server-socket.h -@@ -34,6 +34,9 @@ DBusServer* _dbus_server_new_for_socket (DBusSocket *fds, - const DBusString *address, - DBusNonceFile *noncefile, - DBusError *error); -+DBusServer* _dbus_server_new_for_vsock (const char *cid, -+ const char *port, -+ DBusError *error); - DBusServer* _dbus_server_new_for_autolaunch (const DBusString *address, - DBusError *error); - DBUS_PRIVATE_EXPORT -diff --git a/dbus/dbus-server-unix.c b/dbus/dbus-server-unix.c -index c7ace2bc..0f34fa8e 100644 ---- a/dbus/dbus-server-unix.c -+++ b/dbus/dbus-server-unix.c -@@ -287,6 +287,26 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry, - return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; - } - } -+#endif -+#ifdef DBUS_ENABLE_VSOCK -+ else if (strcmp (method, "vsock") == 0) -+ { -+ const char *vsock_cid_var = dbus_address_entry_get_value (entry, "cid"); -+ const char *vsock_port_var = dbus_address_entry_get_value (entry, "port"); -+ *server_p = _dbus_server_new_for_vsock (vsock_cid_var, vsock_port_var, error); -+ -+ if (*server_p != NULL) -+ { -+ _DBUS_ASSERT_ERROR_IS_CLEAR(error); -+ return DBUS_SERVER_LISTEN_OK; -+ } -+ else -+ { -+ _DBUS_ASSERT_ERROR_IS_SET(error); -+ return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; -+ } -+ -+ } - #endif - else - { --- -2.42.0 - diff --git a/pkgs/dbus/0006-dbus-add-_dbus_connect_vsock.patch b/pkgs/dbus/0006-dbus-add-_dbus_connect_vsock.patch deleted file mode 100644 index 18ec6d9..0000000 --- a/pkgs/dbus/0006-dbus-add-_dbus_connect_vsock.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 3ac54c0f252cbdedcd86a19822d6f4e736741856 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> -Date: Sun, 10 Jan 2021 00:43:55 +0400 -Subject: [PATCH 6/9] dbus: add _dbus_connect_vsock -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later -SPDX-FileCopyrightText: 2002, 2003, 2006 Red Hat, Inc. -SPDX-FileCopyrightText: 2003 CodeFactory AB -SPDX-FileCopyrightText: The D-Bus Authors - -Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> ---- - dbus/dbus-sysdeps-unix.c | 47 ++++++++++++++++++++++++++++++++++++++++ - dbus/dbus-sysdeps-unix.h | 3 +++ - 2 files changed, 50 insertions(+) - -diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c -index 9a46625a..829219e6 100644 ---- a/dbus/dbus-sysdeps-unix.c -+++ b/dbus/dbus-sysdeps-unix.c -@@ -1611,6 +1611,53 @@ _dbus_vsock_parse_port (const char *port, - return TRUE; - } - -+int -+_dbus_connect_vsock (const char *cid, -+ const char *port, -+ DBusError *error) -+{ -+ int fd; -+ struct sockaddr_vm sa; -+ -+ _DBUS_ASSERT_ERROR_IS_CLEAR (error); -+ -+ _DBUS_ZERO (sa); -+ sa.svm_family = AF_VSOCK; -+ -+ if (!_dbus_vsock_parse_cid (cid, &sa.svm_cid, error) || -+ !_dbus_vsock_parse_port (port, &sa.svm_port, error)) -+ { -+ _DBUS_ASSERT_ERROR_IS_SET(error); -+ return -1; -+ } -+ -+ if (!_dbus_open_socket (&fd, AF_VSOCK, SOCK_STREAM, 0, error)) -+ { -+ _DBUS_ASSERT_ERROR_IS_SET(error); -+ return -1; -+ } -+ -+ if (connect (fd, (struct sockaddr *) &sa, sizeof (sa)) < 0) -+ { -+ dbus_set_error (error, -+ _dbus_error_from_errno (errno), -+ "Failed to connect to vsock CID:%s port:%s: %s", -+ cid, port, _dbus_strerror (errno)); -+ -+ _dbus_close (fd, NULL); -+ return -1; -+ } -+ -+ if (!_dbus_set_fd_nonblocking (fd, error)) -+ { -+ _DBUS_ASSERT_ERROR_IS_SET (error); -+ _dbus_close (fd, NULL); -+ return -1; -+ } -+ -+ return fd; -+} -+ - int - _dbus_listen_vsock (const char *cid, - const char *port, -diff --git a/dbus/dbus-sysdeps-unix.h b/dbus/dbus-sysdeps-unix.h -index 49b8f436..8d72b56e 100644 ---- a/dbus/dbus-sysdeps-unix.h -+++ b/dbus/dbus-sysdeps-unix.h -@@ -73,6 +73,9 @@ int _dbus_listen_unix_socket (const char *path, - dbus_bool_t abstract, - DBusError *error); - -+int _dbus_connect_vsock (const char *cid, -+ const char *port, -+ DBusError *error); - int _dbus_listen_vsock (const char *cid, - const char *port, - DBusString *retcid, --- -2.42.0 - diff --git a/pkgs/dbus/0007-dbus-add-vsock-client-support.patch b/pkgs/dbus/0007-dbus-add-vsock-client-support.patch deleted file mode 100644 index 5115021..0000000 --- a/pkgs/dbus/0007-dbus-add-vsock-client-support.patch +++ /dev/null @@ -1,117 +0,0 @@ -From cb3a8ab9bd11ec5eafe5798ae8a8825915d8d3a1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> -Date: Sun, 10 Jan 2021 00:44:55 +0400 -Subject: [PATCH 7/9] dbus: add vsock: client support -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later -SPDX-FileCopyrightText: 2002, 2003, 2004 Red Hat Inc. -SPDX-FileCopyrightText: The D-Bus Authors - -Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> ---- - dbus/dbus-transport-unix.c | 80 ++++++++++++++++++++++++++++++++++++++ - 1 file changed, 80 insertions(+) - -diff --git a/dbus/dbus-transport-unix.c b/dbus/dbus-transport-unix.c -index 30c3ba44..6664206c 100644 ---- a/dbus/dbus-transport-unix.c -+++ b/dbus/dbus-transport-unix.c -@@ -109,6 +109,53 @@ _dbus_transport_new_for_domain_socket (const char *path, - return NULL; - } - -+#ifdef DBUS_ENABLE_VSOCK -+static DBusTransport * -+_dbus_transport_new_for_vsock (const char *cid, -+ const char *port, -+ DBusError *error) -+{ -+ DBusSocket fd = DBUS_SOCKET_INIT; -+ DBusTransport *transport = NULL; -+ DBusString address = _DBUS_STRING_INIT_INVALID; -+ -+ _DBUS_ASSERT_ERROR_IS_CLEAR (error); -+ -+ if (!_dbus_string_init (&address)) -+ { -+ dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); -+ goto out; -+ } -+ -+ if (!_dbus_string_append_printf (&address, "vsock:cid=%s,port=%s", -+ cid, port)) -+ { -+ dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); -+ goto out; -+ } -+ -+ fd.fd = _dbus_connect_vsock (cid, port, error); -+ if (fd.fd < 0) -+ goto out; -+ -+ _dbus_verbose ("Successfully connected to CID:%s port:%s\n", -+ cid, port); -+ -+ transport = _dbus_transport_new_for_socket (fd, NULL, &address); -+ if (transport) -+ /* DBusTransport takes ownership on success */ -+ _dbus_socket_invalidate (&fd); -+ else -+ dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); -+ -+out: -+ _DBUS_ASSERT_ERROR_XOR_BOOL (error, transport != NULL); -+ _dbus_close_socket (fd, NULL); -+ _dbus_string_free (&address); -+ return transport; -+} -+#endif -+ - /** - * Creates a new transport for the given binary and arguments. This - * creates a client-side of a transport. The process will be forked -@@ -346,6 +393,39 @@ _dbus_transport_open_platform_specific (DBusAddressEntry *entry, - return DBUS_TRANSPORT_OPEN_OK; - } - } -+#ifdef DBUS_ENABLE_VSOCK -+ else if (strcmp (method, "vsock") == 0) -+ { -+ const char *cid = dbus_address_entry_get_value (entry, "cid"); -+ const char *port = dbus_address_entry_get_value (entry, "port"); -+ -+ if (cid == NULL) -+ { -+ _dbus_set_bad_address (error, NULL, NULL, -+ "Missing vsock CID to connect to"); -+ return DBUS_TRANSPORT_OPEN_BAD_ADDRESS; -+ } -+ -+ if (port == NULL) -+ { -+ _dbus_set_bad_address (error, NULL, NULL, -+ "Missing vsock port to connect to"); -+ return DBUS_TRANSPORT_OPEN_BAD_ADDRESS; -+ } -+ -+ *transport_p = _dbus_transport_new_for_vsock (cid, port, error); -+ if (*transport_p == NULL) -+ { -+ _DBUS_ASSERT_ERROR_IS_SET (error); -+ return DBUS_TRANSPORT_OPEN_DID_NOT_CONNECT; -+ } -+ else -+ { -+ _DBUS_ASSERT_ERROR_IS_CLEAR (error); -+ return DBUS_TRANSPORT_OPEN_OK; -+ } -+ } -+#endif - #ifdef DBUS_ENABLE_LAUNCHD - else if (strcmp (method, "launchd") == 0) - { --- -2.42.0 - diff --git a/pkgs/dbus/0008-test-add-simple-loopback-vsock-test.patch b/pkgs/dbus/0008-test-add-simple-loopback-vsock-test.patch deleted file mode 100644 index 425945b..0000000 --- a/pkgs/dbus/0008-test-add-simple-loopback-vsock-test.patch +++ /dev/null @@ -1,127 +0,0 @@ -From f007236005cf26015e5dcdccb5161b9f2b85d134 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> -Date: Sat, 9 Jan 2021 22:05:53 +0400 -Subject: [PATCH 8/9] test: add simple loopback vsock: test -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -SPDX-License-Identifier: GPL-2.0-or-later -SPDX-FileCopyrightText: 2010-2012 Nokia Corporation -SPDX-FileCopyrightText: 2013-2015 Collabora Ltd. -SPDX-FileCopyrightText: The D-Bus Authors - -Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> ---- - test/loopback.c | 40 ++++++++++++++++++++++++++++++++++++++++ - test/test-utils-glib.c | 10 ++++++++++ - test/test-utils-glib.h | 1 + - 3 files changed, 51 insertions(+) - -diff --git a/test/loopback.c b/test/loopback.c -index f89f5a95..f02ef8d6 100644 ---- a/test/loopback.c -+++ b/test/loopback.c -@@ -35,6 +35,10 @@ - - #include <errno.h> - #include <string.h> -+#ifdef DBUS_ENABLE_VSOCK -+#include <sys/socket.h> -+#include <linux/vm_sockets.h> -+#endif - - #include "test-utils-glib.h" - -@@ -107,6 +111,15 @@ setup (Fixture *f, - return; - } - -+#ifdef DBUS_ENABLE_VSOCK -+ if ((g_str_has_prefix (addr, "vsock:") && -+ !test_check_vsock_works ())) -+ { -+ f->skip = TRUE; -+ return; -+ } -+#endif -+ - f->server = dbus_server_listen (addr, &f->e); - assert_no_error (&f->e); - g_assert (f->server != NULL); -@@ -260,6 +273,28 @@ test_connect (Fixture *f, - /* No particular statement about the path here: for that see - * setup_runtime() and setup_no_runtime() */ - } -+#endif -+#ifdef DBUS_ENABLE_VSOCK -+ else if (g_strcmp0 (listening_address, "vsock:") == 0) -+ { -+ DBusString addr_str; -+ const char *cid = dbus_address_entry_get_value (entries[0], "cid"); -+ const char *port = dbus_address_entry_get_value (entries[0], "port"); -+ -+ g_assert_cmpstr (dbus_address_entry_get_method (entries[0]), ==, "vsock"); -+ -+ g_assert_nonnull (cid); -+ g_assert_cmpstr (cid, ==, "4294967295"); -+ dbus_free (address); -+ address = NULL; -+ -+ _dbus_string_init (&addr_str); -+ _dbus_string_append_printf (&addr_str, "vsock:cid=%u,port=%s", -+ 1 /* VMADDR_CID_LOCAL */, port); -+ _dbus_string_steal_data (&addr_str, &address); -+ _dbus_string_free (&addr_str); -+ g_assert_nonnull (address); -+ } - #endif - else - { -@@ -523,6 +558,11 @@ main (int argc, - test_bad_guid, teardown); - #endif - -+#ifdef DBUS_ENABLE_VSOCK -+ g_test_add ("/connect/vsock", Fixture, "vsock:", setup, -+ test_connect, teardown); -+#endif -+ - ret = g_test_run (); - dbus_shutdown (); - return ret; -diff --git a/test/test-utils-glib.c b/test/test-utils-glib.c -index 2aafb03e..de24f685 100644 ---- a/test/test-utils-glib.c -+++ b/test/test-utils-glib.c -@@ -899,6 +899,16 @@ test_check_tcp_works (void) - #endif - } - -+#ifdef DBUS_ENABLE_VSOCK -+gboolean -+test_check_vsock_works (void) -+{ -+ int fd = socket (AF_VSOCK, SOCK_STREAM, 0); -+ g_close (fd, NULL); -+ return fd >= 0; -+} -+#endif -+ - /* - * Store the result of an async operation. @user_data is a pointer to a - * variable that can store @result, initialized to %NULL. -diff --git a/test/test-utils-glib.h b/test/test-utils-glib.h -index c4a2c543..d24cb382 100644 ---- a/test/test-utils-glib.h -+++ b/test/test-utils-glib.h -@@ -131,6 +131,7 @@ backported_g_steal_pointer (gpointer pointer_to_pointer) - #endif - - gboolean test_check_tcp_works (void); -+gboolean test_check_vsock_works (void); - - void test_store_result_cb (GObject *source_object, - GAsyncResult *result, --- -2.42.0 - diff --git a/pkgs/dbus/0009-vsock-add-allow-CIDs.-on-listenable-address.patch b/pkgs/dbus/0009-vsock-add-allow-CIDs.-on-listenable-address.patch deleted file mode 100644 index cdf096f..0000000 --- a/pkgs/dbus/0009-vsock-add-allow-CIDs.-on-listenable-address.patch +++ /dev/null @@ -1,255 +0,0 @@ -From db3dfe2fc8732a5d431c7bf5d07da8e17731b1fa Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com> -Date: Thu, 14 Jan 2021 17:30:51 +0400 -Subject: [PATCH 9/9] vsock: add allow=CIDs... on listenable address -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later -SPDX-FileCopyrightText: 2002, 2003, 2004, 2006 Red Hat Inc. -SPDX-FileCopyrightText: The D-Bus Authors - -Limit access to peer CID listed in the allow= list. - -When several CIDs are given, the comma will need to be percent-encoded. - -Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> ---- - dbus/dbus-server-socket.c | 111 +++++++++++++++++++++++++++++++++++++ - dbus/dbus-server-socket.h | 1 + - dbus/dbus-server-unix.c | 5 +- - doc/dbus-specification.xml | 8 +++ - 4 files changed, 124 insertions(+), 1 deletion(-) - -diff --git a/dbus/dbus-server-socket.c b/dbus/dbus-server-socket.c -index 074b2dfd..581a231e 100644 ---- a/dbus/dbus-server-socket.c -+++ b/dbus/dbus-server-socket.c -@@ -32,6 +32,8 @@ - #ifdef DBUS_ENABLE_VSOCK - #include "dbus-sysdeps.h" - #include "dbus-sysdeps-unix.h" -+#include <sys/socket.h> -+#include <linux/vm_sockets.h> - #endif - - /** -@@ -59,6 +61,10 @@ struct DBusServerSocket - DBusWatch **watch; /**< File descriptor watch. */ - char *socket_name; /**< Name of domain socket, to unlink if appropriate */ - DBusNonceFile *noncefile; /**< Nonce file used to authenticate clients */ -+#ifdef DBUS_ENABLE_VSOCK -+ int n_allow_cids; /**< Number of allowed CIDs. */ -+ unsigned int *allow_cids; /**< Allowed CIDs. */ -+#endif - }; - - static void -@@ -76,6 +82,9 @@ socket_finalize (DBusServer *server) - socket_server->watch[i] = NULL; - } - -+#ifdef DBUS_ENABLE_VSOCK -+ dbus_free (socket_server->allow_cids); -+#endif - dbus_free (socket_server->fds); - dbus_free (socket_server->watch); - dbus_free (socket_server->socket_name); -@@ -157,6 +166,37 @@ handle_new_client_fd_and_unlock (DBusServer *server, - return TRUE; - } - -+#ifdef DBUS_ENABLE_VSOCK -+static dbus_bool_t -+_dbus_server_allow_vsock_client (DBusServerSocket *server, DBusSocket client_fd) -+{ -+ struct sockaddr_vm sa; -+ socklen_t len; -+ int n; -+ -+ if (server->n_allow_cids == 0) -+ return TRUE; -+ -+ _DBUS_ZERO (sa); -+ len = sizeof (sa); -+ if (getpeername (_dbus_socket_get_int (client_fd), (struct sockaddr *)&sa, &len) < 0) -+ { -+ int saved_errno; -+ saved_errno = _dbus_save_socket_errno (); -+ _dbus_verbose ("Failed to getpeername(): %s\n", _dbus_strerror (saved_errno)); -+ return FALSE; -+ } -+ -+ for (n = 0; n < server->n_allow_cids; n++) -+ { -+ if (server->allow_cids[n] == sa.svm_cid) -+ return TRUE; -+ } -+ -+ return FALSE; -+} -+#endif -+ - static dbus_bool_t - socket_handle_watch (DBusWatch *watch, - unsigned int flags, -@@ -196,6 +236,14 @@ socket_handle_watch (DBusWatch *watch, - else - client_fd = _dbus_accept (listen_fd); - -+#ifdef DBUS_ENABLE_VSOCK -+ if (!_dbus_server_allow_vsock_client (socket_server, client_fd)) -+ { -+ _dbus_close_socket (client_fd, NULL); -+ _dbus_socket_invalidate (&client_fd); -+ } -+#endif -+ - saved_errno = _dbus_save_socket_errno (); - - if (!_dbus_socket_is_valid (client_fd)) -@@ -400,19 +448,76 @@ failed: - } - - #ifdef DBUS_ENABLE_VSOCK -+static dbus_bool_t -+_dbus_vsock_parse_cid_list (const char *list, -+ unsigned int **ret_list_cids, -+ int *ret_n_list_cids, -+ DBusError *error) -+{ -+ DBusString list_str; -+ unsigned int *list_cids = NULL; -+ int n = 0; -+ int pos; -+ int end; -+ -+ _DBUS_ASSERT_ERROR_IS_CLEAR (error); -+ -+ if (!list) -+ goto end; -+ -+ // over-allocate -+ end = strlen (list); -+ list_cids = dbus_new0 (unsigned int, end); -+ -+ _dbus_string_init_const (&list_str, list); -+ for (pos = 0, n = 0; pos < end; ) { -+ unsigned long val; -+ -+ if (!_dbus_string_parse_uint (&list_str, pos, &val, &pos) || -+ val > _DBUS_UINT32_MAX || -+ (list[pos] && list[pos] != ',')) -+ { -+ dbus_set_error (error, -+ DBUS_ERROR_BAD_ADDRESS, -+ "Failed to parse VSOCK CID list '%s'", list); -+ dbus_free (list_cids); -+ return FALSE; -+ } -+ -+ list_cids[n++] = val; -+ pos++; -+ } -+ -+end: -+ *ret_list_cids = list_cids; -+ *ret_n_list_cids = n; -+ -+ return TRUE; -+} -+ - DBusServer * - _dbus_server_new_for_vsock (const char *cid, - const char *port, -+ const char *allow, - DBusError *error) - { - DBusServer *server = NULL; -+ DBusServerSocket *server_socket = NULL; - DBusSocket listen_fd = DBUS_SOCKET_INIT; - DBusString address = _DBUS_STRING_INIT_INVALID; - DBusString cid_str = _DBUS_STRING_INIT_INVALID; - DBusString port_str = _DBUS_STRING_INIT_INVALID; -+ unsigned int *allow_cids = NULL; -+ int n_allow_cids = 0; - - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - -+ if (!_dbus_vsock_parse_cid_list (allow, &allow_cids, &n_allow_cids, error)) -+ { -+ _DBUS_ASSERT_ERROR_IS_SET (error); -+ goto out; -+ } -+ - if (!_dbus_string_init (&address) || - !_dbus_string_init (&cid_str) || - !_dbus_string_init (&port_str)) -@@ -441,11 +546,17 @@ _dbus_server_new_for_vsock (const char *cid, - if (server) - _dbus_socket_invalidate (&listen_fd); - -+ server_socket = (DBusServerSocket *)server; -+ server_socket->n_allow_cids = n_allow_cids; -+ server_socket->allow_cids = allow_cids; -+ allow_cids = NULL; -+ - out: - _dbus_close_socket (listen_fd, NULL); - _dbus_string_free (&cid_str); - _dbus_string_free (&port_str); - _dbus_string_free (&address); -+ dbus_free (allow_cids); - return server; - } - #endif -diff --git a/dbus/dbus-server-socket.h b/dbus/dbus-server-socket.h -index d2461148..62b61aac 100644 ---- a/dbus/dbus-server-socket.h -+++ b/dbus/dbus-server-socket.h -@@ -36,6 +36,7 @@ DBusServer* _dbus_server_new_for_socket (DBusSocket *fds, - DBusError *error); - DBusServer* _dbus_server_new_for_vsock (const char *cid, - const char *port, -+ const char *allow, - DBusError *error); - DBusServer* _dbus_server_new_for_autolaunch (const DBusString *address, - DBusError *error); -diff --git a/dbus/dbus-server-unix.c b/dbus/dbus-server-unix.c -index 0f34fa8e..1809cecc 100644 ---- a/dbus/dbus-server-unix.c -+++ b/dbus/dbus-server-unix.c -@@ -293,7 +293,10 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry, - { - const char *vsock_cid_var = dbus_address_entry_get_value (entry, "cid"); - const char *vsock_port_var = dbus_address_entry_get_value (entry, "port"); -- *server_p = _dbus_server_new_for_vsock (vsock_cid_var, vsock_port_var, error); -+ const char *vsock_allow_var = dbus_address_entry_get_value (entry, "allow"); -+ -+ *server_p = _dbus_server_new_for_vsock (vsock_cid_var, vsock_port_var, -+ vsock_allow_var, error); - - if (*server_p != NULL) - { -diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml -index 775928c0..25dab7af 100644 ---- a/doc/dbus-specification.xml -+++ b/doc/dbus-specification.xml -@@ -3740,6 +3740,14 @@ - port numbers. - </entry> - </row> -+ <row> -+ <entry>allow</entry> -+ <entry>(comma-separated 32 bits unsigned numbers)</entry> -+ <entry> -+ Used on listenable address, to configure the list of allowed peer -+ CID. If unset, all CID peers are allowed to connect. -+ </entry> -+ </row> - </tbody> - </tgroup> - </informaltable> --- -2.42.0 - diff --git a/pkgs/dbus/default.nix b/pkgs/dbus/default.nix deleted file mode 100644 index a17ffb9..0000000 --- a/pkgs/dbus/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Alyssa Ross <hi@alyssa.is> -# SPDX-License-Identifier: MIT - -import ../../lib/overlay-package.nix [ "dbus" ] ({ final, super }: - -super.dbus.overrideAttrs ({ configureFlags ? [], patches ? [], ... }: { - patches = patches ++ [ - # https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/200 - ./0001-doc-add-vsock-address-format-to-the-spec.patch - ./0002-build-sys-add-enable-vsock-option.patch - ./0003-unix-add-vsock-support-to-_dbus_append_address_from_.patch - ./0004-dbus-add-_dbus_listen_vsock.patch - ./0005-dbus-add-vsock-server-support.patch - ./0006-dbus-add-_dbus_connect_vsock.patch - ./0007-dbus-add-vsock-client-support.patch - ./0008-test-add-simple-loopback-vsock-test.patch - ./0009-vsock-add-allow-CIDs.-on-listenable-address.patch - ]; - - configureFlags = configureFlags ++ [ - "--enable-vsock" - ]; - - separateDebugInfo = true; -})) diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix index 2987e7c..55cb00c 100644 --- a/pkgs/overlay.nix +++ b/pkgs/overlay.nix @@ -3,6 +3,4 @@ (final: super: { cloud-hypervisor = import ./cloud-hypervisor { inherit final super; }; - - dbus = import ./dbus { inherit final super; }; }) -- 2.51.0