1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00

Always attempt setgroups but allow failure to be ignored.

This commit is contained in:
Ben Radford 2023-07-11 10:44:03 +01:00
parent 25b20b4ad2
commit 07dabcc90e
No known key found for this signature in database
GPG key ID: 9DF5D4640AB888D5
3 changed files with 11 additions and 8 deletions

View file

@ -20,14 +20,14 @@ unshare --mount --map-root-user bash <<EOF
setLocalStore store1
expectStderr 1 "\${cmd[@]}" | grepQuiet "unable to start build process"
# Fails with `drop-supplementary-groups`
# Fails with `require-drop-supplementary-groups`
# TODO better error
setLocalStore store2
NIX_CONFIG='drop-supplementary-groups = true' \
NIX_CONFIG='require-drop-supplementary-groups = true' \
expectStderr 1 "\${cmd[@]}" | grepQuiet "unable to start build process"
# Works without `drop-supplementary-groups`
# Works without `require-drop-supplementary-groups`
setLocalStore store3
NIX_CONFIG='drop-supplementary-groups = false' \
NIX_CONFIG='require-drop-supplementary-groups = false' \
"\${cmd[@]}"
EOF