Add support for rootless overlay mounts

This patch sets the userxattr field when run in rootless mode.

Fixes: https://github.com/containers/buildah/issues/3503

Patch came from @flouthoc  Aditya Rajan <arajan@redhat.com>

[NO TESTS NEEDED] Since this can not be tested in CI/CD system yet.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh 2021-09-08 13:14:26 -04:00
parent a5aba5ccd1
commit 4dc36e85b4
No known key found for this signature in database
GPG Key ID: A2DF901DABE2C028
1 changed files with 1 additions and 0 deletions

View File

@ -144,6 +144,7 @@ func mountHelper(contentDir, source, dest string, _, _ int, graphOptions []strin
return mount, nil
}
/* If a mount_program is not specified, fallback to try mount native overlay. */
overlayOptions = fmt.Sprintf("%s,userxattr", overlayOptions)
}
mount.Source = mergeDir