|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
From 6b25470ee28843a49c50442e9d8a98edc842ceca Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
Date: Mon, 20 Feb 2023 12:00:30 +0900
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
Subject: [PATCH] core/manager: run generators directly when we are in initrd
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
Some initrd system write files at ourside of /run, /etc, or other
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
allowed places. This is a kind of workaround, but in most cases, such
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
sandboxing is not necessary as the filesystem is on ramfs when we are in
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
initrd.
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
Fixes
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
src/core/manager.c | 4 ++
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
diff
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
index 7b394794b0d4..306477c6e6c2 100644
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
@@ -3822,8 +3822,8 @@ static int manager_run_generators(Manager *m) {
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
* we are the user manager, let's just execute the generators directly. We might not have the
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
* necessary privileges, and the system manager has already mounted /tmp/ and everything else for us.
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
- */
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
- if (MANAGER_IS_USER(m)) {
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
+ * If we are in initrd, let's also execute the generators directly, as we are in ramfs. */
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
+ if (MANAGER_IS_USER(m) || in_initrd()) {
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
r = manager_execute_generators(m, paths, false);
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
goto finish;
|
|
Zbigniew Jędrzejewski-Szmek |
8fe1f0 |
}
|