summaryrefslogtreecommitdiffhomepage
path: root/runsc/specutils
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-29 20:18:37 +0000
committergVisor bot <gvisor-bot@google.com>2020-04-29 20:18:37 +0000
commit3c9938407e3139ada541743ed65434a498c746be (patch)
treecb8a8f80a4ae58f112434065033fbe7a351d8a55 /runsc/specutils
parent633d413b30734e629996821342b81d4e67e0cb22 (diff)
parentd5c34ba2ffef0b0aee38d4f96f06bc00b04b0a53 (diff)
Merge release-20200413.0-22-gd5c34ba (automated)
Diffstat (limited to 'runsc/specutils')
-rw-r--r--runsc/specutils/specutils.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/runsc/specutils/specutils.go b/runsc/specutils/specutils.go
index 837d5e238..202518b58 100644
--- a/runsc/specutils/specutils.go
+++ b/runsc/specutils/specutils.go
@@ -311,7 +311,19 @@ func capsFromNames(names []string, skipSet map[linux.Capability]struct{}) (auth.
// Is9PMount returns true if the given mount can be mounted as an external gofer.
func Is9PMount(m specs.Mount) bool {
- return m.Type == "bind" && m.Source != "" && IsSupportedDevMount(m)
+ var isBind bool
+ switch m.Type {
+ case "bind":
+ isBind = true
+ default:
+ for _, opt := range m.Options {
+ if opt == "bind" || opt == "rbind" {
+ isBind = true
+ break
+ }
+ }
+ }
+ return isBind && m.Source != "" && IsSupportedDevMount(m)
}
// IsSupportedDevMount returns true if the mount is a supported /dev mount.