Fail in case mount option is unknown

PiperOrigin-RevId: 239425816
Change-Id: I3b1479c61b4222c3931a416c4efc909157044330
This commit is contained in:
Fabricio Voznika
2019-03-20 10:36:20 -07:00
committed by Shentubot
parent 9f4e1cb797
commit c7877b0a14
+1 -2
View File
@@ -20,7 +20,6 @@ import (
"syscall"
specs "github.com/opencontainers/runtime-spec/specs-go"
"gvisor.googlesource.com/gvisor/pkg/log"
)
type mapping struct {
@@ -121,7 +120,7 @@ func validateMount(mnt *specs.Mount) error {
_, ok1 := optionsMap[o]
_, ok2 := propOptionsMap[o]
if !ok1 && !ok2 {
log.Warningf("Ignoring unknown mount option %q", o)
return fmt.Errorf("unknown mount option %q", o)
}
}
}