summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2022-04-05 21:37:59 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2022-04-06 22:54:14 +0200
commit31cd2dd9060decfb5c1341e2b126d3dde643e02a (patch)
tree4dc42b12d1ec575e7be391a719278b8fa6d7a8da /src
parentMerge pull request #22996 from yuwata/test-sfdisk-lock (diff)
downloadsystemd-31cd2dd9060decfb5c1341e2b126d3dde643e02a.tar.xz
systemd-31cd2dd9060decfb5c1341e2b126d3dde643e02a.zip
core: taint if /usr is unmerged
9afd5e7b975e8051c011ff9c07c95e80bd954469 introduced a build-time taint, introduce a runtime one as well, in preparation for removing support for unmerged-usr in a future release
Diffstat (limited to 'src')
-rw-r--r--src/core/manager.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 4b86fe15c1..2f60b14159 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -4377,12 +4377,16 @@ char* manager_taint_string(const Manager *m) {
assert(m);
- const char* stage[11] = {};
+ const char* stage[12] = {};
size_t n = 0;
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";