find-esp: do not skip fstype check even when --root= or --image= is specified

The check was introduced by 63105f33ed,
but there is no reason to skip the check even in such cases.
This commit is contained in:
Yu Watanabe
2023-12-08 12:48:44 +09:00
parent 9bbd3c699c
commit 997ba18af1

View File

@@ -473,12 +473,6 @@ int find_esp_and_warn_at(
flags = verify_esp_flags_init(unprivileged_mode, "SYSTEMD_RELAX_ESP_CHECKS");
r = dir_fd_is_root_or_cwd(rfd);
if (r < 0)
return log_error_errno(r, "Failed to check if directory file descriptor is root: %m");
if (r == 0)
flags |= VERIFY_ESP_SKIP_FSTYPE_CHECK | VERIFY_ESP_SKIP_DEVICE_CHECK;
if (path)
return verify_esp(rfd, path, ret_path, ret_part, ret_pstart, ret_psize, ret_uuid, ret_devid, flags);