diff options
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/hakurei/print.go | 7 | ||||
| -rw-r--r-- | cmd/hakurei/print_test.go | 3 | ||||
| -rw-r--r-- | cmd/hpkg/app.go | 2 | ||||
| -rw-r--r-- | cmd/hpkg/with.go | 4 |
4 files changed, 7 insertions, 9 deletions
diff --git a/cmd/hakurei/print.go b/cmd/hakurei/print.go index db183d71..07fec385 100644 --- a/cmd/hakurei/print.go +++ b/cmd/hakurei/print.go @@ -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") } diff --git a/cmd/hakurei/print_test.go b/cmd/hakurei/print_test.go index 7679c67b..da2db0dc 100644 --- a/cmd/hakurei/print_test.go +++ b/cmd/hakurei/print_test.go @@ -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! diff --git a/cmd/hpkg/app.go b/cmd/hpkg/app.go index 87a2c47c..350eaaa7 100644 --- a/cmd/hpkg/app.go +++ b/cmd/hpkg/app.go @@ -100,7 +100,7 @@ func (app *appInfo) toHst(pathSet *appPathSet, pathname *check.Absolute, argv [] Path: pathname, Args: argv, }, - ExtraPerms: []*hst.ExtraPermConfig{ + ExtraPerms: []hst.ExtraPermConfig{ {Path: dataHome, Execute: true}, {Ensure: true, Path: pathSet.baseDir, Read: true, Write: true, Execute: true}, }, diff --git a/cmd/hpkg/with.go b/cmd/hpkg/with.go index 5d6eb87c..97f80105 100644 --- a/cmd/hpkg/with.go +++ b/cmd/hpkg/with.go @@ -28,7 +28,7 @@ func withNixDaemon( mustRunAppDropShell(ctx, msg, updateConfig(&hst.Config{ ID: app.ID, - ExtraPerms: []*hst.ExtraPermConfig{ + ExtraPerms: []hst.ExtraPermConfig{ {Path: dataHome, Execute: true}, {Ensure: true, Path: pathSet.baseDir, Read: true, Write: true, Execute: true}, }, @@ -83,7 +83,7 @@ func withCacheDir( mustRunAppDropShell(ctx, msg, &hst.Config{ ID: app.ID, - ExtraPerms: []*hst.ExtraPermConfig{ + ExtraPerms: []hst.ExtraPermConfig{ {Path: dataHome, Execute: true}, {Ensure: true, Path: pathSet.baseDir, Read: true, Write: true, Execute: true}, {Path: workDir, Execute: true}, |
