mirror of
https://github.com/containers/podman.git
synced 2025-11-14 01:57:58 +08:00
vendor: bump c/common and other vendors
This commit bumps majorly c/common so netavark features could be synced with podman. But there are some other vendor bumps as well [NO NEW TESTS NEEDED] [NO TESTS NEEDED] Signed-off-by: Aditya R <arajan@redhat.com>
This commit is contained in:
20
vendor/github.com/containers/common/pkg/parse/parse.go
generated
vendored
20
vendor/github.com/containers/common/pkg/parse/parse.go
generated
vendored
@@ -14,9 +14,27 @@ import (
|
||||
|
||||
// ValidateVolumeOpts validates a volume's options
|
||||
func ValidateVolumeOpts(options []string) ([]string, error) {
|
||||
var foundRootPropagation, foundRWRO, foundLabelChange, bindType, foundExec, foundDev, foundSuid, foundChown int
|
||||
var foundRootPropagation, foundRWRO, foundLabelChange, bindType, foundExec, foundDev, foundSuid, foundChown, foundUpperDir, foundWorkDir int
|
||||
finalOpts := make([]string, 0, len(options))
|
||||
for _, opt := range options {
|
||||
// support advanced options like upperdir=/path, workdir=/path
|
||||
if strings.Contains(opt, "upperdir") {
|
||||
foundUpperDir++
|
||||
if foundUpperDir > 1 {
|
||||
return nil, errors.Errorf("invalid options %q, can only specify 1 upperdir per overlay", strings.Join(options, ", "))
|
||||
}
|
||||
finalOpts = append(finalOpts, opt)
|
||||
continue
|
||||
}
|
||||
if strings.Contains(opt, "workdir") {
|
||||
foundWorkDir++
|
||||
if foundWorkDir > 1 {
|
||||
return nil, errors.Errorf("invalid options %q, can only specify 1 workdir per overlay", strings.Join(options, ", "))
|
||||
}
|
||||
finalOpts = append(finalOpts, opt)
|
||||
continue
|
||||
}
|
||||
|
||||
switch opt {
|
||||
case "noexec", "exec":
|
||||
foundExec++
|
||||
|
||||
Reference in New Issue
Block a user