systemd/SOURCES/0440-manager-add-one-more-assert.patch

26 lines
744 B
Diff
Raw Permalink Normal View History

2024-04-30 11:42:21 +00:00
From efe1737efae0950b7ded32d9c5e1a9cfaea7296b Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 2 Jan 2023 15:00:05 +0100
Subject: [PATCH] manager: add one more assert()
(cherry picked from commit 7fa49280bc33ba5135228401fb24dce0de5f9195)
Related: RHEL-6090
---
src/core/manager.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/core/manager.c b/src/core/manager.c
index 657263eb73..6371810ce3 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -806,6 +806,8 @@ static int manager_find_credentials_dirs(Manager *m) {
}
void manager_set_switching_root(Manager *m, bool switching_root) {
+ assert(m);
+
m->switching_root = MANAGER_IS_SYSTEM(m) && switching_root;
}