overlay: always honor mountProgram
if a mountProgram is specified, use it also in rootfull mode. Closes: https://github.com/containers/buildah/issues/3281 [NO NEW TESTS NEEDED] Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
5a25fc6f83
commit
4d0eb18796
|
@ -188,7 +188,6 @@ func MountWithOptions(contentDir, source, dest string, opts *Options) (mount spe
|
|||
overlayOptions = fmt.Sprintf("lowerdir=%s,upperdir=%s,workdir=%s,private", escapeColon(source), upperDir, workDir)
|
||||
}
|
||||
|
||||
if unshare.IsRootless() {
|
||||
mountProgram := findMountProgram(opts.GraphOpts)
|
||||
if mountProgram != "" {
|
||||
if err := mountWithMountProgram(mountProgram, overlayOptions, mergeDir); err != nil {
|
||||
|
@ -201,7 +200,9 @@ func MountWithOptions(contentDir, source, dest string, opts *Options) (mount spe
|
|||
mount.Options = []string{"bind", "slave"}
|
||||
return mount, nil
|
||||
}
|
||||
/* If a mount_program is not specified, fallback to try mount native overlay. */
|
||||
|
||||
if unshare.IsRootless() {
|
||||
/* If a mount_program is not specified, fallback to try mounting native overlay. */
|
||||
overlayOptions = fmt.Sprintf("%s,userxattr", overlayOptions)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue