Skip to content

Commit 5f3ac16

Browse files
committed
merge #5152 into opencontainers/runc:main
Kir Kolyshkin (1): libct: remove relabeling dead code LGTMs: cyphar rata
2 parents 2db0c5e + 8b2b5e9 commit 5f3ac16

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

libcontainer/configs/mount_linux.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ type Mount struct {
4343
// Mount data applied to the mount.
4444
Data string `json:"data,omitempty"`
4545

46-
// Relabel source if set, "z" indicates shared, "Z" indicates unshared.
47-
Relabel string `json:"relabel,omitempty"`
46+
// Relabel field is ignored.
47+
//
48+
// Deprecated: do not use. This field will be removed in runc 1.7.
49+
Relabel string
4850

4951
// RecAttr represents mount properties to be applied recursively (AT_RECURSIVE), see mount_setattr(2).
5052
RecAttr *unix.MountAttr `json:"rec_attr,omitempty"`

libcontainer/rootfs_linux.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -747,16 +747,6 @@ func mountToRootfs(c *mountConfig, m mountEntry) error {
747747
return fmt.Errorf("failed to set user-requested vfs flags on bind-mount: %w", err)
748748
}
749749
}
750-
751-
if m.Relabel != "" {
752-
if err := label.Validate(m.Relabel); err != nil {
753-
return err
754-
}
755-
shared := label.IsShared(m.Relabel)
756-
if err := label.Relabel(m.Source, mountLabel, shared); err != nil {
757-
return err
758-
}
759-
}
760750
return setRecAttr(m)
761751
case "cgroup":
762752
if cgroups.IsCgroup2UnifiedMode() {

0 commit comments

Comments
 (0)