···11+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
22+From: oxalica <oxalicc@pm.me>
33+Date: Tue, 4 Oct 2022 09:18:07 +0800
44+Subject: [PATCH] core: don't taint on unmerged /usr
55+66+NixOS has very different approach towards /bin and /sbin - they don't
77+really exist (except for /bin/sh and /usr/bin/env, because these are used
88+heavily in shebangs around the world). The concept of merged or unmerged
99+usr doesn't really apply here at all, it's neither of the two.
1010+Users don't execute things from /bin or /sbin, there's nothing else in
1111+there. In all cases, systemd doesn't look things up from /usr/bin or /bin,
1212+so showing the taint isn't really helpful.
1313+1414+See also: https://github.com/systemd/systemd/issues/24191
1515+---
1616+ src/core/manager.c | 4 ----
1717+ 1 file changed, 4 deletions(-)
1818+1919+diff --git a/src/core/manager.c b/src/core/manager.c
2020+index 33ded94a7c..8847479799 100644
2121+--- a/src/core/manager.c
2222++++ b/src/core/manager.c
2323+@@ -4488,10 +4488,6 @@ char* manager_taint_string(const Manager *m) {
2424+ if (m->taint_usr)
2525+ stage[n++] = "split-usr";
2626+2727+- _cleanup_free_ char *usrbin = NULL;
2828+- if (readlink_malloc("/bin", &usrbin) < 0 || !PATH_IN_SET(usrbin, "usr/bin", "/usr/bin"))
2929+- stage[n++] = "unmerged-usr";
3030+-
3131+ if (access("/proc/cgroups", F_OK) < 0)
3232+ stage[n++] = "cgroups-missing";
3333+