lix/src/libstore/build
jade 9909a175bf Fix /etc/group having desynced IDs from the actual UID in the sandbox
This was found when `logrotate.conf` failed to build in a NixOS system
with:

    /nix/store/26zdl4pyw5qazppj8if5lm8bjzxlc07l-coreutils-9.3/bin/id: cannot find name for group ID 30000

This was surprising because it seemed to mean that /etc/group was busted
in the sandbox. Indeed it was:

    root0:
    nixbld:!💯
    nogroup65534:

We diagnosed this to sandboxUid() being called before
usingUserNamespace() was called, in setting up /etc/group inside the
sandbox. This code desperately needs refactoring.

We also moved the /etc/group code to be with the /etc/passwd code, but
honestly this code is all spaghetti'd all over the place and needs some
more serious tidying than we did here.

We also moved some checks to be earlier to improve locality with where
the things they are checking come from.

Change-Id: Ie29798771f3593c46ec313a32960fa955054aceb
2024-05-04 17:36:50 -07:00
..
derivation-goal.cc fix probable format bug in DerivationGoal::buildDone 2024-04-15 23:09:40 +00:00
derivation-goal.hh Make things that can throw not noexcept anymore 2024-03-29 20:26:38 -07:00
drv-output-substitution-goal.cc Fix crash/hang with CA derivations 2023-03-08 11:09:15 +01:00
drv-output-substitution-goal.hh Adapt scheduler to work with dynamic derivations 2023-08-25 10:01:25 -04:00
entry-points.cc libexpr: Support structured error classes 2024-03-09 04:47:05 -07:00
goal.cc Adapt scheduler to work with dynamic derivations 2023-08-25 10:01:25 -04:00
goal.hh Make things that can throw not noexcept anymore 2024-03-29 20:26:38 -07:00
hook-instance.cc libutil: make AutoCloseFD a better resource 2024-03-18 15:42:52 -06:00
hook-instance.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
local-derivation-goal.cc Fix /etc/group having desynced IDs from the actual UID in the sandbox 2024-05-04 17:36:50 -07:00
local-derivation-goal.hh Make things that can throw not noexcept anymore 2024-03-29 20:26:38 -07:00
personality.cc Also set the PER_LINUX32 personality flag on armv5tel-linux 2023-06-02 03:04:13 -06:00
personality.hh Add pre-commit checks 2024-03-29 22:57:40 -07:00
sandbox-defaults.sb Merge pull request #9641 from amarshall/darwin-sandbox-stderr 2024-03-04 07:26:03 +01:00
sandbox-minimal.sb Move macOS sandbox files to sr/libstore/build 2023-01-04 04:50:45 -08:00
sandbox-network.sb Move macOS sandbox files to sr/libstore/build 2023-01-04 04:50:45 -08:00
substitution-goal.cc util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
substitution-goal.hh Adapt scheduler to work with dynamic derivations 2023-08-25 10:01:25 -04:00
worker.cc util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
worker.hh Revert "Adapt scheduler to work with dynamic derivations" 2023-10-02 15:05:23 +00:00