teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0222-install-fail-early-if-specifier-expansion-failed.patch

2aacef
From b9fb1769f8b6de65abf1f57a85b0d0a22f84c754 Mon Sep 17 00:00:00 2001
2aacef
From: David Tardon <dtardon@redhat.com>
2aacef
Date: Tue, 21 Feb 2023 14:10:33 +0100
2aacef
Subject: [PATCH] install: fail early if specifier expansion failed
2aacef
2aacef
Before:
2aacef
2aacef
systemd[1]: Assertion 'path' failed at src/shared/install.c:288, function install_changes_add(). Aborting.
2aacef
systemd[1]: Caught <ABRT> from our own process.
2aacef
systemd[1]: Caught <ABRT>, dumped core as pid 2525.
2aacef
systemd[1]: Freezing execution
2aacef
2aacef
After:
2aacef
2aacef
Failed to enable unit: Invalid specifier in user-%J.service
2aacef
2aacef
Fixes #26467.
2aacef
2aacef
Follow-up for: f5a0162
2aacef
2aacef
(cherry picked from commit f8979e869812988835f6951fb73a68e30a4c608c)
2aacef
2aacef
Related: #2138081
2aacef
---
2aacef
 src/shared/install.c | 2 ++
2aacef
 1 file changed, 2 insertions(+)
2aacef
2aacef
diff --git a/src/shared/install.c b/src/shared/install.c
2aacef
index a760726628..8d4aa5ab2c 100644
2aacef
--- a/src/shared/install.c
2aacef
+++ b/src/shared/install.c
2aacef
@@ -1982,6 +1982,8 @@ static int install_info_symlink_wants(
2aacef
                         install_changes_add(changes, n_changes, q, *s, NULL);
2aacef
                         if (r >= 0)
2aacef
                                 r = q;
2aacef
+
2aacef
+                        continue;
2aacef
                 }
2aacef
 
2aacef
                 if (!unit_name_is_valid(dst, valid_dst_type)) {