Skip to content

Commit ea857d9

Browse files
committed
temp. fix after rebase: move createVTPMs to later point
Since config.Namespaces is not filled at this point (due to a bug in runc), we need to move the createVTPMs to a later point. Signed-off-by: Stefan Berger <[email protected]>
1 parent a2fa1c4 commit ea857d9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libcontainer/specconv/spec_linux.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,6 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
201201
if err := setupUserNamespace(spec, config); err != nil {
202202
return nil, err
203203
}
204-
if err := createVTPMs(spec, config); err != nil {
205-
return nil, err
206-
}
207204
c, err := createCgroupConfig(opts)
208205
if err != nil {
209206
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
}
@@ -524,11 +524,11 @@ func createVTPMs(spec *specs.Spec, config *configs.Config) error {
524524
return nil
525525
}
526526

527-
rootUID, err := config.HostUID(0)
527+
rootUID, err := config.HostRootUID()
528528
if err != nil {
529529
return err
530530
}
531-
rootGID, err := config.HostGID(0)
531+
rootGID, err := config.HostRootGID()
532532
if err != nil {
533533
return err
534534
}

0 commit comments

Comments
 (0)