diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-12-13 18:51:34 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-12-17 18:26:15 +0100 |
commit | a87a9625f8bde776ece11b8ddb77588cfff73038 (patch) | |
tree | 616b3fe12b4a010dbe72a5329fe0282ed9f7a95d /src/home | |
parent | discover-image: modernize image discovery around O_PATH (#35513) (diff) | |
download | systemd-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/home')
-rw-r--r-- | src/home/homed-home.c | 3 | ||||
-rw-r--r-- | src/home/homework-cifs.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/home/homed-home.c b/src/home/homed-home.c index 32691e4f81..751b197be8 100644 --- a/src/home/homed-home.c +++ b/src/home/homed-home.c @@ -13,7 +13,6 @@ #include "build-path.h" #include "bus-common-errors.h" #include "bus-locator.h" -#include "data-fd-util.h" #include "env-util.h" #include "errno-list.h" #include "errno-util.h" @@ -1266,7 +1265,7 @@ static int home_start_work( if (r < 0) return r; - stdin_fd = acquire_data_fd(formatted); + stdin_fd = memfd_new_and_seal_string("request", formatted); if (stdin_fd < 0) return stdin_fd; diff --git a/src/home/homework-cifs.c b/src/home/homework-cifs.c index edc9a4b274..f665c75d7f 100644 --- a/src/home/homework-cifs.c +++ b/src/home/homework-cifs.c @@ -5,7 +5,6 @@ #include <linux/fs.h> #endif -#include "data-fd-util.h" #include "dirent-util.h" #include "fd-util.h" #include "fileio.h" @@ -13,6 +12,7 @@ #include "fs-util.h" #include "homework-cifs.h" #include "homework-mount.h" +#include "memfd-util.h" #include "mkdir.h" #include "mount-util.h" #include "process-util.h" @@ -76,7 +76,7 @@ int home_setup_cifs( pid_t mount_pid; int exit_status; - passwd_fd = acquire_data_fd(*pw); + passwd_fd = memfd_new_and_seal_string("cifspw", *pw); if (passwd_fd < 0) return log_error_errno(passwd_fd, "Failed to create data FD for password: %m"); |