mirror of
https://github.com/containers/podman.git
synced 2025-12-10 15:47:46 +08:00
Vendor in latest containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
16
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
16
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
@@ -47,8 +47,7 @@ var (
|
||||
)
|
||||
|
||||
const (
|
||||
defaultPerms = os.FileMode(0555)
|
||||
selinuxLabelTest = "system_u:object_r:container_file_t:s0"
|
||||
defaultPerms = os.FileMode(0555)
|
||||
)
|
||||
|
||||
// This backend uses the overlay union filesystem for containers
|
||||
@@ -315,7 +314,10 @@ func Init(home string, options graphdriver.Options) (graphdriver.Driver, error)
|
||||
}
|
||||
fsName, ok := graphdriver.FsNames[fsMagic]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("filesystem type %#x reported for %s is not supported with 'overlay': %w", fsMagic, filepath.Dir(home), graphdriver.ErrIncompatibleFS)
|
||||
if opts.mountProgram == "" {
|
||||
return nil, fmt.Errorf("filesystem type %#x reported for %s is not supported with 'overlay': %w", fsMagic, filepath.Dir(home), graphdriver.ErrIncompatibleFS)
|
||||
}
|
||||
fsName = "<unknown>"
|
||||
}
|
||||
backingFs = fsName
|
||||
|
||||
@@ -654,6 +656,8 @@ func SupportsNativeOverlay(home, runhome string) (bool, error) {
|
||||
func supportsOverlay(home string, homeMagic graphdriver.FsMagic, rootUID, rootGID int) (supportsDType bool, err error) {
|
||||
// We can try to modprobe overlay first
|
||||
|
||||
selinuxLabelTest := selinux.PrivContainerMountLabel()
|
||||
|
||||
exec.Command("modprobe", "overlay").Run()
|
||||
|
||||
logLevel := logrus.ErrorLevel
|
||||
@@ -1505,7 +1509,7 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
|
||||
}
|
||||
}
|
||||
|
||||
if d.supportsIDmappedMounts() && len(options.UidMaps) > 0 && len(options.GidMaps) > 0 {
|
||||
if !disableShifting && len(options.UidMaps) > 0 && len(options.GidMaps) > 0 {
|
||||
var newAbsDir []string
|
||||
mappedRoot := filepath.Join(d.home, id, "mapped")
|
||||
if err := os.MkdirAll(mappedRoot, 0700); err != nil {
|
||||
@@ -2098,8 +2102,8 @@ func (d *Driver) supportsIDmappedMounts() bool {
|
||||
|
||||
// SupportsShifting tells whether the driver support shifting of the UIDs/GIDs in an userNS
|
||||
func (d *Driver) SupportsShifting() bool {
|
||||
if os.Getenv("_TEST_FORCE_SUPPORT_SHIFTING") == "yes-please" {
|
||||
return true
|
||||
if os.Getenv("_CONTAINERS_OVERLAY_DISABLE_IDMAP") == "yes" {
|
||||
return false
|
||||
}
|
||||
if d.options.mountProgram != "" {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user