Skip to content

Commit 2e1fe02

Browse files
committed
tpm: move createVTPMs to point after init of config.Namespaces
Move the call to createVTPMs() to a point after the config.Namespaces has been initialized. Signed-off-by: Stefan Berger <[email protected]>
1 parent a71552e commit 2e1fe02

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libcontainer/specconv/spec_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
194194
if err := setupUserNamespace(spec, config); err != nil {
195195
return nil, err
196196
}
197-
if err := createVTPMs(spec, config); err != nil {
198-
return nil, err
199-
}
200197
c, err := createCgroupConfig(opts)
201198
if err != nil {
202199
return nil, err
@@ -237,6 +234,9 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
237234
config.Seccomp = seccomp
238235
}
239236
}
237+
if err := createVTPMs(spec, config); err != nil {
238+
return nil, err
239+
}
240240
if spec.Process.SelinuxLabel != "" {
241241
config.ProcessLabel = spec.Process.SelinuxLabel
242242
}

0 commit comments

Comments
 (0)