filesystem

package
v0.0.0-...-5dac054 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRootfsPath = "/tmp/coso/rootfs"
)

Variables

This section is empty.

Functions

func MountProc

func MountProc(newroot string) error

MountProc executes a mount syscallmount, mounting the proc filesystem at mountpoint (default is /proc).

This is useful when creating a new PID namespace. MountProc should not be executed inside the default/global namespace since the /proc mount would otherwise mess up existing programs on the system.

func PivotRoot

func PivotRoot(newroot string) error

PivotRoot executes a pivot_root syscall, setting a new root filesystem for the calling process

A pivot_root syscall has some requirements:

  1. They must both be directories
  2. They must not be on the same filesystem as the current root
  3. putold must be underneath newroot
  4. No other filesystem may be mounted on putold

func VerifyRootfsExists

func VerifyRootfsExists(rootfsPath string)

VerifyRootfsExists checks a valid root filesystem to use as lower layer has been provided

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL