Own directories of a joining module carry setgid, to an engine that takes it (hq ADR 0334 v4)
This commit is contained in:
@@ -357,6 +357,11 @@ func TestAJoiningModulesOwnDirectoriesAreItsOwnGroups(t *testing.T) {
|
||||
if owner := got["radarr.config"]["owner"]; owner != "50020:50020" {
|
||||
t.Errorf("its directory is owned by %v; want its user and its own group", owner)
|
||||
}
|
||||
// ADR 0334 v4: with setgid, so what is made in it later keeps mesh-radarr though the process's primary group is the
|
||||
// library's.
|
||||
if mode := got["radarr.config"]["mode"]; mode != "0750" {
|
||||
t.Errorf("an engine that refuses setgid modes was sent %v", mode)
|
||||
}
|
||||
if env := got["radarr.app"]["env"].(map[string]any); env["PGID"] != "50010" {
|
||||
t.Errorf("its process's primary group is %v; want the library's, so what it makes there keeps the group", env["PGID"])
|
||||
}
|
||||
@@ -366,9 +371,13 @@ func TestAJoiningModulesOwnDirectoriesAreItsOwnGroups(t *testing.T) {
|
||||
}
|
||||
with := librariesRendering()
|
||||
with.RunnerJoinsOwnGroups = true
|
||||
if got := composeLibraries(t, r, with).Identities[0].Runner; got != "jochen" {
|
||||
newer := composeLibraries(t, r, with)
|
||||
if got := newer.Identities[0].Runner; got != "jochen" {
|
||||
t.Errorf("the runner joins %q's own group; want jochen, whose tools it runs", got)
|
||||
}
|
||||
if mode := byID(newer.Resources)["radarr.config"]["mode"]; mode != "2750" {
|
||||
t.Errorf("its directory's mode is %v; want 2750, setgid on its own 0750", mode)
|
||||
}
|
||||
}
|
||||
|
||||
// novox/hq ADR 0334 §3: a joining module whose tools name a directory whose mode closes it to its group is refused at
|
||||
|
||||
Reference in New Issue
Block a user