(req *criurpc.CriuReq)
| 125 | } |
| 126 | |
| 127 | func (c *Container) addMaskPaths(req *criurpc.CriuReq) error { |
| 128 | for _, path := range c.config.MaskPaths { |
| 129 | fi, err := os.Stat(fmt.Sprintf("/proc/%d/root/%s", c.initProcess.pid(), path)) |
| 130 | if err != nil { |
| 131 | if errors.Is(err, os.ErrNotExist) { |
| 132 | continue |
| 133 | } |
| 134 | return err |
| 135 | } |
| 136 | if fi.IsDir() { |
| 137 | continue |
| 138 | } |
| 139 | |
| 140 | extMnt := &criurpc.ExtMountMap{ |
| 141 | Key: mkPtr(path), |
| 142 | Val: mkPtr("/dev/null"), |
| 143 | } |
| 144 | req.Opts.ExtMnt = append(req.Opts.ExtMnt, extMnt) |
| 145 | } |
| 146 | return nil |
| 147 | } |
| 148 | |
| 149 | func (c *Container) handleCriuConfigurationFile(rpcOpts *criurpc.CriuOpts) { |
| 150 | // CRIU will evaluate a configuration starting with release 3.11. |
no test coverage detected