MCPcopy
hub / github.com/opencontainers/runc / chroot

Function chroot

libcontainer/rootfs_linux.go:1252–1260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1250}
1251
1252func 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.
1263func readonlyPath(path string) error {

Callers 2

prepareRootfsFunction · 0.85
msMoveRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…