···1+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+From: oxalica <oxalicc@pm.me>
3+Date: Tue, 4 Oct 2022 09:18:07 +0800
4+Subject: [PATCH] core: don't taint on unmerged /usr
5+6+NixOS has very different approach towards /bin and /sbin - they don't
7+really exist (except for /bin/sh and /usr/bin/env, because these are used
8+heavily in shebangs around the world). The concept of merged or unmerged
9+usr doesn't really apply here at all, it's neither of the two.
10+Users don't execute things from /bin or /sbin, there's nothing else in
11+there. In all cases, systemd doesn't look things up from /usr/bin or /bin,
12+so showing the taint isn't really helpful.
13+14+See also: https://github.com/systemd/systemd/issues/24191
15+---
16+ src/core/manager.c | 4 ----
17+ 1 file changed, 4 deletions(-)
18+19+diff --git a/src/core/manager.c b/src/core/manager.c
20+index 33ded94a7c..8847479799 100644
21+--- a/src/core/manager.c
22++++ b/src/core/manager.c
23+@@ -4488,10 +4488,6 @@ char* manager_taint_string(const Manager *m) {
24+ if (m->taint_usr)
25+ stage[n++] = "split-usr";
26+27+- _cleanup_free_ char *usrbin = NULL;
28+- if (readlink_malloc("/bin", &usrbin) < 0 || !PATH_IN_SET(usrbin, "usr/bin", "/usr/bin"))
29+- stage[n++] = "unmerged-usr";
30+-
31+ if (access("/proc/cgroups", F_OK) < 0)
32+ stage[n++] = "cgroups-missing";
33+