summaryrefslogtreecommitdiffstats
path: root/src/core/dbus-manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-12-13 18:51:34 +0100
committerLennart Poettering <lennart@poettering.net>2024-12-17 18:26:15 +0100
commita87a9625f8bde776ece11b8ddb77588cfff73038 (patch)
tree616b3fe12b4a010dbe72a5329fe0282ed9f7a95d /src/core/dbus-manager.c
parentdiscover-image: modernize image discovery around O_PATH (#35513) (diff)
downloadsystemd-a87a9625f8bde776ece11b8ddb77588cfff73038.tar.xz
systemd-a87a9625f8bde776ece11b8ddb77588cfff73038.zip
tree-wide: drop acquire_data_fd_full() helper
Let's drop support systems lacking memfds, i.e. pre kernel 3.17 systems. This allows us to drastically simplify the "data fd" concept, so far that we can remove it entirely. This replaces acquire_data_fd() with a specialized call to memfd_new_and_seal(), not that memfds can be the only implementation of the concept.
Diffstat (limited to 'src/core/dbus-manager.c')
-rw-r--r--src/core/dbus-manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 20b05446b6..4e9ea8ac27 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -14,7 +14,6 @@
#include "bus-util.h"
#include "chase.h"
#include "confidential-virt.h"
-#include "data-fd-util.h"
#include "dbus-cgroup.h"
#include "dbus-execute.h"
#include "dbus-job.h"
@@ -33,6 +32,7 @@
#include "locale-util.h"
#include "log.h"
#include "manager-dump.h"
+#include "memfd-util.h"
#include "os-util.h"
#include "parse-util.h"
#include "path-util.h"
@@ -1447,7 +1447,7 @@ static int method_dump(sd_bus_message *message, void *userdata, sd_bus_error *er
static int reply_dump_by_fd(sd_bus_message *message, char *dump) {
_cleanup_close_ int fd = -EBADF;
- fd = acquire_data_fd(dump);
+ fd = memfd_new_and_seal_string("dump", dump);
if (fd < 0)
return fd;