Skip to content

Commit

Permalink
generate: fix type for Umask
Browse files Browse the repository at this point in the history
umask is a pointer to an uint32.

The error was first present in the runtime-specs Go bindings and it
was fixed with:

opencontainers/runtime-spec#1058

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe committed Jan 15, 2021
1 parent db8c0f0 commit 1d051e9
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 24 deletions.
6 changes: 3 additions & 3 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion generate/generate.go
Expand Up @@ -447,7 +447,8 @@ func (g *Generator) SetProcessUsername(username string) {
// SetProcessUmask sets g.Config.Process.User.Umask.
func (g *Generator) SetProcessUmask(umask uint32) {
g.initConfigProcess()
g.Config.Process.User.Umask = umask
u := umask
g.Config.Process.User.Umask = &u
}

// SetProcessGID sets g.Config.Process.User.GID.
Expand Down
10 changes: 5 additions & 5 deletions validation/util/test.go
Expand Up @@ -52,11 +52,11 @@ const (
LifecycleStatusStopped
)

var lifecycleStatusMap = map[string]LifecycleStatus{
"creating": LifecycleStatusCreating,
"created": LifecycleStatusCreated,
"running": LifecycleStatusRunning,
"stopped": LifecycleStatusStopped,
var lifecycleStatusMap = map[rspec.ContainerState]LifecycleStatus{
rspec.StateCreating: LifecycleStatusCreating,
rspec.StateCreated: LifecycleStatusCreated,
rspec.StateRunning: LifecycleStatusRunning,
rspec.StateStopped: LifecycleStatusStopped,
}

// LifecycleConfig includes
Expand Down
33 changes: 20 additions & 13 deletions vendor/github.com/opencontainers/runtime-spec/specs-go/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion vendor/github.com/opencontainers/runtime-spec/specs-go/state.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1d051e9

Please sign in to comment.