vscode-extensions.github.copilot{*}: bump (#364729)
[NixPkgs.git] / pkgs / os-specific / linux / systemd / 0014-core-don-t-taint-on-unmerged-usr.patch
blob0fd274d7a5b78d9f4fc8ffefbe71f9297acb8d56
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
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.
14 See also: https://github.com/systemd/systemd/issues/24191
15 ---
16 src/core/taint.c | 8 --------
17 1 file changed, 8 deletions(-)
19 diff --git a/src/core/taint.c b/src/core/taint.c
20 index 969b37f209..de64e8f1f9 100644
21 --- a/src/core/taint.c
22 +++ b/src/core/taint.c
23 @@ -41,14 +41,6 @@ char* taint_string(void) {
25 _cleanup_free_ char *bin = NULL, *usr_sbin = NULL, *var_run = NULL;
27 - if (readlink_malloc("/bin", &bin) < 0 || !PATH_IN_SET(bin, "usr/bin", "/usr/bin"))
28 - stage[n++] = "unmerged-usr";
30 - /* Note that the check is different from default_PATH(), as we want to taint on uncanonical symlinks
31 - * too. */
32 - if (readlink_malloc("/usr/sbin", &usr_sbin) < 0 || !PATH_IN_SET(usr_sbin, "bin", "/usr/bin"))
33 - stage[n++] = "unmerged-bin";
35 if (readlink_malloc("/var/run", &var_run) < 0 || !PATH_IN_SET(var_run, "../run", "/run"))
36 stage[n++] = "var-run-bad";