diff options
author | Luca Boccassi <bluca@debian.org> | 2022-04-05 20:37:59 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2022-04-06 21:54:14 +0100 |
commit | 31cd2dd9060decfb5c1341e2b126d3dde643e02a (patch) | |
tree | 4dc42b12d1ec575e7be391a719278b8fa6d7a8da | |
parent | 124d293268f09881eadd3ec1b91b326a7bf2bd89 (diff) | |
download | systemd-31cd2dd9060decfb5c1341e2b126d3dde643e02a.tar.gz |
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
-rw-r--r-- | README | 7 | ||||
-rw-r--r-- | src/core/manager.c | 6 |
2 files changed, 12 insertions, 1 deletions
@@ -353,6 +353,13 @@ WARNINGS and TAINT FLAGS: For more information on this issue consult https://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken + systemd will warn if the filesystem is not usr-merged (i.e.: /bin, /sbin + and /lib* are not symlinks to their counterparts under /usr). Taint flag + 'unmerged-usr' will be set when this condition is detected. + + For more information on this issue consult + https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge + systemd requires that the /run mount point exists. systemd also requires that /var/run is a symlink to /run. Taint flag 'var-run-bad' will be set when this condition is detected. 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"; |