systemd: don't taint on unmerged /usr
Discussion: https://github.com/systemd/systemd/issues/24191#issuecomment-1209350080
This commit is contained in:
parent
520f8b8581
commit
5a8e48c968
@ -0,0 +1,33 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: oxalica <oxalicc@pm.me>
|
||||||
|
Date: Tue, 4 Oct 2022 09:18:07 +0800
|
||||||
|
Subject: [PATCH] core: don't taint on unmerged /usr
|
||||||
|
|
||||||
|
NixOS has very different approach towards /bin and /sbin - they don't
|
||||||
|
really exist (except for /bin/sh and /usr/bin/env, because these are used
|
||||||
|
heavily in shebangs around the world). The concept of merged or unmerged
|
||||||
|
usr doesn't really apply here at all, it's neither of the two.
|
||||||
|
Users don't execute things from /bin or /sbin, there's nothing else in
|
||||||
|
there. In all cases, systemd doesn't look things up from /usr/bin or /bin,
|
||||||
|
so showing the taint isn't really helpful.
|
||||||
|
|
||||||
|
See also: https://github.com/systemd/systemd/issues/24191
|
||||||
|
---
|
||||||
|
src/core/manager.c | 4 ----
|
||||||
|
1 file changed, 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/core/manager.c b/src/core/manager.c
|
||||||
|
index 33ded94a7c..8847479799 100644
|
||||||
|
--- a/src/core/manager.c
|
||||||
|
+++ b/src/core/manager.c
|
||||||
|
@@ -4488,10 +4488,6 @@ char* manager_taint_string(const Manager *m) {
|
||||||
|
if (m->taint_usr)
|
||||||
|
stage[n++] = "split-usr";
|
||||||
|
|
||||||
|
- _cleanup_free_ char *usrbin = NULL;
|
||||||
|
- if (readlink_malloc("/bin", &usrbin) < 0 || !PATH_IN_SET(usrbin, "usr/bin", "/usr/bin"))
|
||||||
|
- stage[n++] = "unmerged-usr";
|
||||||
|
-
|
||||||
|
if (access("/proc/cgroups", F_OK) < 0)
|
||||||
|
stage[n++] = "cgroups-missing";
|
||||||
|
|
@ -163,6 +163,7 @@ stdenv.mkDerivation {
|
|||||||
./0015-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
|
./0015-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
|
||||||
./0016-pkg-config-derive-prefix-from-prefix.patch
|
./0016-pkg-config-derive-prefix-from-prefix.patch
|
||||||
./0017-inherit-systemd-environment-when-calling-generators.patch
|
./0017-inherit-systemd-environment-when-calling-generators.patch
|
||||||
|
./0018-core-don-t-taint-on-unmerged-usr.patch
|
||||||
] ++ lib.optional stdenv.hostPlatform.isMusl (
|
] ++ lib.optional stdenv.hostPlatform.isMusl (
|
||||||
let
|
let
|
||||||
oe-core = fetchzip {
|
oe-core = fetchzip {
|
||||||
|
Loading…
Reference in New Issue
Block a user