Skip to content

Commit 031f34a

Browse files
committed
Make vTPM work with user namespaces
The setup call for Usernamespaces must come before creating the VTPM devices, otherwise we get odd error messages that the uid mappings are not available. Signed-off-by: Stefan Berger <[email protected]>
1 parent 85ed6bd commit 031f34a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcontainer/specconv/spec_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
212212
if err := createDevices(spec, config); err != nil {
213213
return nil, err
214214
}
215-
if err := createVTPMs(spec, config); err != nil {
215+
if err := setupUserNamespace(spec, config); err != nil {
216216
return nil, err
217217
}
218-
if err := setupUserNamespace(spec, config); err != nil {
218+
if err := createVTPMs(spec, config); err != nil {
219219
return nil, err
220220
}
221221
c, err := createCgroupConfig(opts)

0 commit comments

Comments
 (0)