portable: reopen socket with O_RDONLY

Follow-up for e3f7ed944a
This commit is contained in:
Luca Boccassi
2022-02-03 22:50:56 +00:00
committed by Luca Boccassi
parent 75844b44ee
commit 1d2bf1f0ee
+1 -1
View File
@@ -611,7 +611,7 @@ static int extract_image_and_extensions(
continue;
/* We need to keep the fd valid, to return the PortableMetadata to the caller. */
extension_release_fd = fd_reopen(extension_release_meta->fd, O_CLOEXEC);
extension_release_fd = fd_reopen(extension_release_meta->fd, O_CLOEXEC|O_RDONLY);
if (extension_release_fd < 0)
return extension_release_fd;