portable: always reopen fd of release file

To make it support the case that the fd is O_PATH.
This commit is contained in:
Yu Watanabe
2023-04-11 05:17:52 +09:00
parent e63d070373
commit fe008489f7
+3 -3
View File
@@ -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)