mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Merge pull request #13170 from rhatdan/idmap
idmap should be able to be specified along with other options
This commit is contained in:
@ -25,7 +25,7 @@ type defaultMountOptions struct {
|
||||
// The sourcePath variable, if not empty, contains a bind mount source.
|
||||
func ProcessOptions(options []string, isTmpfs bool, sourcePath string) ([]string, error) {
|
||||
var (
|
||||
foundWrite, foundSize, foundProp, foundMode, foundExec, foundSuid, foundDev, foundCopyUp, foundBind, foundZ, foundU, foundOverlay bool
|
||||
foundWrite, foundSize, foundProp, foundMode, foundExec, foundSuid, foundDev, foundCopyUp, foundBind, foundZ, foundU, foundOverlay, foundIdmap bool
|
||||
)
|
||||
|
||||
newOptions := make([]string, 0, len(options))
|
||||
@ -49,9 +49,10 @@ func ProcessOptions(options []string, isTmpfs bool, sourcePath string) ([]string
|
||||
case "O":
|
||||
foundOverlay = true
|
||||
case "idmap":
|
||||
if len(options) > 1 {
|
||||
return nil, errors.Wrapf(ErrDupeMntOption, "'O' option can not be used with other options")
|
||||
if foundIdmap {
|
||||
return nil, errors.Wrapf(ErrDupeMntOption, "the 'idmap' option can only be set once")
|
||||
}
|
||||
foundIdmap = true
|
||||
case "exec", "noexec":
|
||||
if foundExec {
|
||||
return nil, errors.Wrapf(ErrDupeMntOption, "only one of 'noexec' and 'exec' can be used")
|
||||
|
Reference in New Issue
Block a user