()
| 1250 | } |
| 1251 | |
| 1252 | func chroot() error { |
| 1253 | if err := unix.Chroot("."); err != nil { |
| 1254 | return &os.PathError{Op: "chroot", Path: ".", Err: err} |
| 1255 | } |
| 1256 | if err := unix.Chdir("/"); err != nil { |
| 1257 | return &os.PathError{Op: "chdir", Path: "/", Err: err} |
| 1258 | } |
| 1259 | return nil |
| 1260 | } |
| 1261 | |
| 1262 | // readonlyPath will make a path read only. |
| 1263 | func readonlyPath(path string) error { |
no outgoing calls
no test coverage detected
searching dependent graphs…