Merge pull request #9461 from kinvolk/rata/idmap
pkg/process: Check using idmap mount options too
This commit is contained in:
commit
9a7130d132
@ -206,6 +206,10 @@ func (p *Init) validateIDMapMounts(ctx context.Context, spec *specs.Spec) error
|
||||
used = true
|
||||
break
|
||||
}
|
||||
if sliceContainsStr(m.Options, "idmap") || sliceContainsStr(m.Options, "ridmap") {
|
||||
used = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !used {
|
||||
@ -552,3 +556,12 @@ func withConditionalIO(c stdio.Stdio) runc.IOOpt {
|
||||
o.OpenStderr = c.Stderr != ""
|
||||
}
|
||||
}
|
||||
|
||||
func sliceContainsStr(s []string, str string) bool {
|
||||
for _, s := range s {
|
||||
if s == str {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user