Skip to content

Commit

Permalink
tpm: move createVTPMs to point after init of config.Namespaces
Browse files Browse the repository at this point in the history
Move the call to createVTPMs() to a point after the config.Namespaces
has been initialized.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
  • Loading branch information
stefanberger committed Sep 8, 2017
1 parent 14d1d14 commit 3d13c75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libcontainer/specconv/spec_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,6 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
if err := setupUserNamespace(spec, config); err != nil {
return nil, err
}
if err := createVTPMs(spec, config); err != nil {
return nil, err
}
c, err := createCgroupConfig(opts)
if err != nil {
return nil, err
Expand Down Expand Up @@ -237,6 +234,9 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
config.Seccomp = seccomp
}
}
if err := createVTPMs(spec, config); err != nil {
return nil, err
}
if spec.Process.SelinuxLabel != "" {
config.ProcessLabel = spec.Process.SelinuxLabel
}
Expand Down

0 comments on commit 3d13c75

Please sign in to comment.