teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0155-shared-install-do-not-print-aliases-longer-than-UNIT.patch

594167
From 5f66b67ac6594a3dee6e463a5f31c2d1051503cc Mon Sep 17 00:00:00 2001
594167
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
594167
Date: Tue, 8 Mar 2022 11:47:23 +0100
594167
Subject: [PATCH] shared/install: do not print aliases longer than
594167
 UNIT_NAME_MAX
594167
594167
065364920281e1cf59cab989e17aff21790505c4 did the conversion to install_path_printf().
594167
But IIUC, here we are just looking at a unit file name, not the full
594167
path.
594167
594167
(cherry picked from commit 46801e7647d98ccac8fca4cc91ef9c3513151943)
594167
594167
Related: #2082131
594167
---
594167
 src/shared/install.c | 2 +-
594167
 1 file changed, 1 insertion(+), 1 deletion(-)
594167
594167
diff --git a/src/shared/install.c b/src/shared/install.c
594167
index c6cbe96fdb..79e5109ce1 100644
594167
--- a/src/shared/install.c
594167
+++ b/src/shared/install.c
594167
@@ -1825,7 +1825,7 @@ static int install_info_symlink_alias(
594167
         STRV_FOREACH(s, i->aliases) {
594167
                 _cleanup_free_ char *alias_path = NULL, *dst = NULL, *dst_updated = NULL;
594167
 
594167
-                q = install_path_printf(i, *s, i->root, &dst);
594167
+                q = install_name_printf(i, *s, i->root, &dst);
594167
                 if (q < 0)
594167
                         return q;
594167