fakeroot

package
v4.1.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineOperations

type EngineOperations struct {
	CommonConfig *config.Common               `json:"-"`
	EngineConfig *fakerootConfig.EngineConfig `json:"engineConfig"`
}

EngineOperations is a Singularity fakeroot runtime engine that implements engine.Operations.

func (*EngineOperations) CleanupContainer

func (e *EngineOperations) CleanupContainer(context.Context, error, syscall.WaitStatus) error

CleanupContainer does nothing for the fakeroot engine.

func (*EngineOperations) CleanupHost

func (e *EngineOperations) CleanupHost(context.Context) error

CleanupHost does nothing for the fakeroot engine.

func (*EngineOperations) Config

func (e *EngineOperations) Config() config.EngineConfig

Config returns a pointer to a fakerootConfig.EngineConfig literal as a config.EngineConfig interface. This pointer gets stored in the engine.Engine.Common field.

Since this method simply returns a zero value of the concrete EngineConfig, it does not matter whether or not there are any elevated privileges during this call.

func (*EngineOperations) CreateContainer

func (e *EngineOperations) CreateContainer(context.Context, int, net.Conn) error

CreateContainer does nothing for the fakeroot engine.

func (*EngineOperations) InitConfig

func (e *EngineOperations) InitConfig(cfg *config.Common)

InitConfig stores the parsed config.Common inside the engine.

Since this method simply stores config.Common, it does not matter whether or not there are any elevated privileges during this call.

func (*EngineOperations) MonitorContainer

func (e *EngineOperations) MonitorContainer(pid int, signals chan os.Signal) (syscall.WaitStatus, error)

MonitorContainer is called from master once the container has been spawned. It will block until the container exists.

Additional privileges may be gained when running hybrid flow.

Particularly here no additional privileges are gained as monitor does not need them for wait4 and kill syscalls.

func (*EngineOperations) PostStartHost added in v4.1.0

func (e *EngineOperations) PostStartHost(context.Context) error

PostStartHost does nothing for the fakeroot engine.

func (*EngineOperations) PostStartProcess

func (e *EngineOperations) PostStartProcess(context.Context, int) error

PostStartProcess does nothing for the fakeroot engine.

func (*EngineOperations) PrepareConfig

func (e *EngineOperations) PrepareConfig(starterConfig *starter.Config) error

PrepareConfig is called during stage1 to validate and prepare container configuration. It is responsible for singularity configuration file parsing, reading capabilities, configuring UID/GID mappings, etc.

No additional privileges can be gained as any of them are already dropped by the time PrepareConfig is called.

func (*EngineOperations) StartProcess

func (e *EngineOperations) StartProcess(_ net.Conn) error

StartProcess is called during stage2 after RPC server finished environment preparation. This is the container process itself. It will execute command in the fakeroot context.

This will be executed as a fake root user in a new user namespace (PrepareConfig will set both).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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