Skip to content

Commit

Permalink
configs: fix idmapped mounts json field names
Browse files Browse the repository at this point in the history
In the runc state JSON we always use snake_case. This is a no-op change,
but it will cause any existing container state files to be incorrectly
parsed. Luckily, commit fbf183c ("Add uid and gid mappings to
mounts") has never been in a runc release so we can change this before a
1.2.z release.

Fixes: fbf183c ("Add uid and gid mappings to mounts")
Signed-off-by: Aleksa Sarai <[email protected]>
  • Loading branch information
cyphar authored and kolyshkin committed Aug 16, 2023
1 parent c8005e7 commit 2d8e8e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libcontainer/configs/mount_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ type Mount struct {
// Note that, the underlying filesystem should support this feature to be
// used.
// Every mount point could have its own mapping.
UIDMappings []IDMap `json:"uidMappings,omitempty"`
UIDMappings []IDMap `json:"uid_mappings,omitempty"`

// GIDMappings is used to changing file group owners w/o calling chown.
// Note that, the underlying filesystem should support this feature to be
// used.
// Every mount point could have its own mapping.
GIDMappings []IDMap `json:"gidMappings,omitempty"`
GIDMappings []IDMap `json:"gid_mappings,omitempty"`
}

func (m *Mount) IsBind() bool {
Expand Down

0 comments on commit 2d8e8e7

Please sign in to comment.