mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
merge #5152 into opencontainers/runc:main
Kir Kolyshkin (1): libct: remove relabeling dead code LGTMs: cyphar rata
This commit is contained in:
@@ -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"`
|
||||
// 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"`
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user