hst/config: hold acl struct by value
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (race detector) (push) Successful in 4m6s
Test / Hpkg (push) Successful in 4m12s
Test / Hakurei (race detector) (push) Successful in 4m46s
Test / Sandbox (push) Successful in 1m22s
Test / Hakurei (push) Successful in 2m18s
Test / Flake checks (push) Successful in 1m37s

Doc comments are also reworded for clarity.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-10-14 07:02:14 +09:00
parent 4c647add0d
commit f95e0a7568
8 changed files with 26 additions and 21 deletions

View File

@@ -129,11 +129,8 @@ func printShowInstance(
}
if len(config.ExtraPerms) > 0 {
t.Printf("Extra ACL\n")
for _, p := range config.ExtraPerms {
if p == nil {
continue
}
t.Printf(" %s\n", p.String())
for i := range config.ExtraPerms {
t.Printf(" %s\n", config.ExtraPerms[i].String())
}
t.Printf("\n")
}

View File

@@ -88,7 +88,7 @@ App
Flags: none
`, false},
{"config nil entries", nil, &hst.Config{Container: &hst.ContainerConfig{Filesystem: make([]hst.FilesystemConfigJSON, 1)}, ExtraPerms: make([]*hst.ExtraPermConfig, 1)}, false, false, `Error: container configuration missing path to home directory!
{"config nil entries", nil, &hst.Config{Container: &hst.ContainerConfig{Filesystem: make([]hst.FilesystemConfigJSON, 1)}, ExtraPerms: make([]hst.ExtraPermConfig, 1)}, false, false, `Error: container configuration missing path to home directory!
App
Identity: 0
@@ -99,6 +99,7 @@ Filesystem
<invalid>
Extra ACL
<invalid>
`, false},
{"config pd dbus see", nil, &hst.Config{SessionBus: &hst.BusConfig{See: []string{"org.example.test"}}}, false, false, `Error: configuration missing container state!