mirror of
https://github.com/systemd/systemd.git
synced 2026-08-09 01:20:53 +00:00
sysupdate: allow long metadata URLs
138829b784moved 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:138829b784
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user