mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fail in case mount option is unknown
PiperOrigin-RevId: 239425816 Change-Id: I3b1479c61b4222c3931a416c4efc909157044330
This commit is contained in:
committed by
Shentubot
parent
9f4e1cb797
commit
c7877b0a14
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user