|
| 1 | +// +build !freebsd |
| 2 | + |
| 3 | +/* |
| 4 | + Copyright The containerd Authors. |
| 5 | +
|
| 6 | + Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | + you may not use this file except in compliance with the License. |
| 8 | + You may obtain a copy of the License at |
| 9 | +
|
| 10 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | + Unless required by applicable law or agreed to in writing, software |
| 13 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + See the License for the specific language governing permissions and |
| 16 | + limitations under the License. |
| 17 | +*/ |
| 18 | + |
| 19 | +package oci |
| 20 | + |
| 21 | +import ( |
| 22 | + specs "github.com/opencontainers/runtime-spec/specs-go" |
| 23 | +) |
| 24 | + |
| 25 | +func defaultMounts() []specs.Mount { |
| 26 | + return []specs.Mount{ |
| 27 | + { |
| 28 | + Destination: "/proc", |
| 29 | + Type: "proc", |
| 30 | + Source: "proc", |
| 31 | + Options: []string{"nosuid", "noexec", "nodev"}, |
| 32 | + }, |
| 33 | + { |
| 34 | + Destination: "/dev", |
| 35 | + Type: "tmpfs", |
| 36 | + Source: "tmpfs", |
| 37 | + Options: []string{"nosuid", "strictatime", "mode=755", "size=65536k"}, |
| 38 | + }, |
| 39 | + { |
| 40 | + Destination: "/dev/pts", |
| 41 | + Type: "devpts", |
| 42 | + Source: "devpts", |
| 43 | + Options: []string{"nosuid", "noexec", "newinstance", "ptmxmode=0666", "mode=0620", "gid=5"}, |
| 44 | + }, |
| 45 | + { |
| 46 | + Destination: "/dev/shm", |
| 47 | + Type: "tmpfs", |
| 48 | + Source: "shm", |
| 49 | + Options: []string{"nosuid", "noexec", "nodev", "mode=1777", "size=65536k"}, |
| 50 | + }, |
| 51 | + { |
| 52 | + Destination: "/dev/mqueue", |
| 53 | + Type: "mqueue", |
| 54 | + Source: "mqueue", |
| 55 | + Options: []string{"nosuid", "noexec", "nodev"}, |
| 56 | + }, |
| 57 | + { |
| 58 | + Destination: "/sys", |
| 59 | + Type: "sysfs", |
| 60 | + Source: "sysfs", |
| 61 | + Options: []string{"nosuid", "noexec", "nodev", "ro"}, |
| 62 | + }, |
| 63 | + { |
| 64 | + Destination: "/run", |
| 65 | + Type: "tmpfs", |
| 66 | + Source: "tmpfs", |
| 67 | + Options: []string{"nosuid", "strictatime", "mode=755", "size=65536k"}, |
| 68 | + }, |
| 69 | + } |
| 70 | +} |
0 commit comments