Always attempt setgroups but allow failure to be ignored.

This commit is contained in:
Ben Radford
2023-07-11 10:44:05 +01:00
parent 25b20b4ad2
commit 07dabcc90e
3 changed files with 11 additions and 8 deletions
+4 -4
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