You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
(Linux) Derivation input corruption when building derivations without build users in a chroot store #16645
Don't use build users and build in a chroot store in a single-user (without build users) manner on Linux. Sandboxing is enabled since there's no other way to build in a chroot store.
E.g:
nix repl --store /tmp/store1234567
:b runCommand "test" { buildInputs = [ pkgs.git ]; } "chmod -R 0700 ${pkgs.git}; stat ${pkgs.git} > $out"
.... The input can be modified by the derivation:
Access: (0700/drwx------)
Expected behavior
Ultimately this is pretty expected and just how lack of priv separation works in this case (or rather doesn't). With only a single user we can't really separate derivation builds from the host uid store owner.
But maybe we can do better and at least mount input store paths readonly?
A real solution would probably be to grab throwaway uids via nsresourced (@artemist and @RaitoBezarius have much more experience with that) if it can now be used in the manner that we want.
Activity