]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/install: do not print aliases longer than UNIT_NAME_MAX
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 8 Mar 2022 10:47:23 +0000 (11:47 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 18 Mar 2022 09:22:20 +0000 (10:22 +0100)
065364920281e1cf59cab989e17aff21790505c4 did the conversion to install_path_printf().
But IIUC, here we are just looking at a unit file name, not the full
path.

src/shared/install.c

index 11240f206cdb7134ad8d1e338e204699678b0f4e..4a2698d6a1d82bbdeaea78d30386fac5d0260f50 100644 (file)
@@ -1820,7 +1820,7 @@ static int install_info_symlink_alias(
         STRV_FOREACH(s, i->aliases) {
                 _cleanup_free_ char *alias_path = NULL, *dst = NULL, *dst_updated = NULL;
 
-                q = install_path_printf(i, *s, i->root, &dst);
+                q = install_name_printf(i, *s, i->root, &dst);
                 if (q < 0)
                         return q;