mirror of
https://github.com/containers/podman.git
synced 2025-11-30 18:18:18 +08:00
Vendor in latest containers(common, storage,image, buildah)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
7
vendor/github.com/containers/buildah/chroot/run_linux.go
generated
vendored
7
vendor/github.com/containers/buildah/chroot/run_linux.go
generated
vendored
@@ -518,7 +518,12 @@ func setupChrootBindMounts(spec *specs.Spec, bundlePath string) (undoBinds func(
|
||||
if effectiveImportantFlags != expectedImportantFlags {
|
||||
// Do a remount to try to get the desired flags to stick.
|
||||
effectiveUnimportantFlags := uintptr(fs.Flags) & ^possibleImportantFlags
|
||||
if err = unix.Mount(target, target, m.Type, unix.MS_REMOUNT|bindFlags|requestFlags|mountFlagsForFSFlags(effectiveUnimportantFlags), ""); err != nil {
|
||||
remountFlags := unix.MS_REMOUNT | bindFlags | requestFlags | mountFlagsForFSFlags(effectiveUnimportantFlags)
|
||||
// If we are requesting a read-only mount, add any possibleImportantFlags present in fs.Flags to remountFlags.
|
||||
if requestFlags&unix.ST_RDONLY == unix.ST_RDONLY {
|
||||
remountFlags |= uintptr(fs.Flags) & possibleImportantFlags
|
||||
}
|
||||
if err = unix.Mount(target, target, m.Type, remountFlags, ""); err != nil {
|
||||
return undoBinds, fmt.Errorf("remounting %q in mount namespace with flags %#x instead of %#x: %w", target, requestFlags, effectiveImportantFlags, err)
|
||||
}
|
||||
// Check if the desired flags stuck.
|
||||
|
||||
Reference in New Issue
Block a user