Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions libcontainer/configs/mount_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ type Mount struct {
// Mount data applied to the mount.
Data string `json:"data,omitempty"`

// Relabel source if set, "z" indicates shared, "Z" indicates unshared.
Relabel string `json:"relabel,omitempty"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, should this have been json:"-"...?

Copy link
Copy Markdown
Contributor Author

@kolyshkin kolyshkin Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All I can say it was initially added by commit 49951d9. At that time the code was at github.com/docker/libcontainer (and that repo was 4 months old), and I'm not even sure who was the actual or the proposed user (dockerd?).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! Right, it should be explicitly omitted at this time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #5160. That one should be included into rc.1 or we'll have a new empty Relabel field in state.json.

// Relabel field is ignored.
//
// Deprecated: do not use. This field will be removed in runc 1.7.
Relabel string

// RecAttr represents mount properties to be applied recursively (AT_RECURSIVE), see mount_setattr(2).
RecAttr *unix.MountAttr `json:"rec_attr,omitempty"`
Expand Down
10 changes: 0 additions & 10 deletions libcontainer/rootfs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -747,16 +747,6 @@ func mountToRootfs(c *mountConfig, m mountEntry) error {
return fmt.Errorf("failed to set user-requested vfs flags on bind-mount: %w", err)
}
}

if m.Relabel != "" {
if err := label.Validate(m.Relabel); err != nil {
return err
}
shared := label.IsShared(m.Relabel)
if err := label.Relabel(m.Source, mountLabel, shared); err != nil {
return err
}
}
return setRecAttr(m)
case "cgroup":
if cgroups.IsCgroup2UnifiedMode() {
Expand Down