summaryrefslogtreecommitdiff
path: root/src/portable
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-04-09 05:55:17 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-04-11 05:17:52 +0900
commitfe008489f7c52a2332e07732c732b59eff8e9dec (patch)
treee9c6696b5cb47786ce9844322a6a2c1f04181863 /src/portable
parente63d070373bb6a0f550d86a58eab635b5bd51ac4 (diff)
downloadsystemd-fe008489f7c52a2332e07732c732b59eff8e9dec.tar.gz
portable: always reopen fd of release file
To make it support the case that the fd is O_PATH.
Diffstat (limited to 'src/portable')
-rw-r--r--src/portable/portabled-image-bus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/portable/portabled-image-bus.c b/src/portable/portabled-image-bus.c
index 6c4cb6ec9d..be8e65df3f 100644
--- a/src/portable/portabled-image-bus.c
+++ b/src/portable/portabled-image-bus.c
@@ -83,9 +83,9 @@ static int append_fd(sd_bus_message *m, PortableMetadata *d) {
if (d) {
assert(d->fd >= 0);
- f = take_fdopen(&d->fd, "r");
- if (!f)
- return -errno;
+ r = fdopen_independent(d->fd, "r", &f);
+ if (r < 0)
+ return r;
r = read_full_stream(f, &buf, &n);
if (r < 0)