From 215c4383724f38b1566ee29c0a2e6f65282dca68 Mon Sep 17 00:00:00 2001 From: dongshengyuan <545258830@qq.com> Date: Wed, 5 Aug 2026 12:17:40 +0800 Subject: [PATCH] sysupdate: allow long metadata URLs 138829b784 moved Documentation=, AppStream=, and related URL parsing into sysupdate-config.c, but kept NAME_MAX as the specifier expansion limit. These settings are URLs, not filenames. Reproducer: configure a feature Documentation= URL longer than NAME_MAX and run systemd-sysupdate features FEATURE. Before: the URL was ignored after ENAMETOOLONG during specifier expansion. After: features FEATURE prints the long Documentation URL. Follow-up for: 138829b7843c6f744764d72d2c995005bfe6dc00 --- src/sysupdate/sysupdate-config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sysupdate/sysupdate-config.c b/src/sysupdate/sysupdate-config.c index 45794b5a212..1b4a0252286 100644 --- a/src/sysupdate/sysupdate-config.c +++ b/src/sysupdate/sysupdate-config.c @@ -34,7 +34,7 @@ int config_parse_url_specifiers( } _cleanup_free_ char *resolved = NULL; - r = specifier_printf(rvalue, NAME_MAX, system_and_tmp_specifier_table, root, NULL, &resolved); + r = specifier_printf(rvalue, SIZE_MAX, system_and_tmp_specifier_table, root, NULL, &resolved); if (r < 0) { log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to expand specifiers in %s=, ignoring: %s", lvalue, rvalue); @@ -90,7 +90,7 @@ int config_parse_url_specifiers_many( } _cleanup_free_ char *resolved = NULL; - r = specifier_printf(rvalue, NAME_MAX, system_and_tmp_specifier_table, root, NULL, &resolved); + r = specifier_printf(rvalue, SIZE_MAX, system_and_tmp_specifier_table, root, NULL, &resolved); if (r < 0) { log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to expand specifiers in %s=, ignoring: %s", lvalue, rvalue);