mountfsd: return a better error when invalid file flags are specified on image fd

We already defined an error for this that we return for invalid dir fds
passed in, let's add the same niceness to the image fds.
This commit is contained in:
Lennart Poettering
2025-12-21 07:04:42 +01:00
parent d4f8be786c
commit a9b60de478
+2
View File
@@ -353,6 +353,8 @@ static int vl_method_mount_image(
}
r = validate_image_fd(image_fd, &p);
if (r == -EREMOTEIO)
return sd_varlink_errorbo(link, "io.systemd.MountFileSystem.BadFileDescriptorFlags", SD_JSON_BUILD_PAIR_STRING("parameter", "imageFileDescriptor"));
if (r < 0)
return r;