(config *configs.Config)
| 1096 | } |
| 1097 | |
| 1098 | func prepareRoot(config *configs.Config) error { |
| 1099 | flag := unix.MS_SLAVE | unix.MS_REC |
| 1100 | if config.RootPropagation != 0 { |
| 1101 | flag = config.RootPropagation |
| 1102 | } |
| 1103 | if err := mount("", "/", "", uintptr(flag), ""); err != nil { |
| 1104 | return err |
| 1105 | } |
| 1106 | |
| 1107 | if err := rootfsParentMountPrivate(config.Rootfs); err != nil { |
| 1108 | return err |
| 1109 | } |
| 1110 | |
| 1111 | return mount(config.Rootfs, config.Rootfs, "bind", unix.MS_BIND|unix.MS_REC, "") |
| 1112 | } |
| 1113 | |
| 1114 | func setReadonly() error { |
| 1115 | flags := uintptr(unix.MS_BIND | unix.MS_REMOUNT | unix.MS_RDONLY) |
no test coverage detected
searching dependent graphs…