gvisorgvisor.dev/gvisor/runsc/fsgofer Index | Files | Directories

package fsgofer

import "gvisor.dev/gvisor/runsc/fsgofer"

Package fsgofer provides a lisafs server implementation which gives access to local files.

Index

Functions

func OpenProcSelfFD

func OpenProcSelfFD(path string) error

OpenProcSelfFD opens the /proc/self/fd directory, which will be used to reopen file descriptors.

Types

type Config

type Config struct {
	// ROMount is set to true if this is a readonly mount.
	ROMount bool

	// PanicOnWrite panics on attempts to write to RO mounts.
	PanicOnWrite bool

	// HostUDS signals whether the gofer can connect to host unix domain sockets.
	HostUDS config.HostUDS

	// HostFifo signals whether the gofer can connect to host FIFOs.
	HostFifo config.HostFifo

	// DonateMountPointFD indicates whether a host FD to the mount point should
	// be donated to the client on Mount RPC.
	DonateMountPointFD bool

	// Gofer process's RUID.
	RUID int

	// Gofer process's EUID.
	EUID int

	// Gofer process's RGID.
	RGID int

	// Gofer process's EGID.
	EGID int
}

Config sets configuration options for each attach point.

type LisafsServer

type LisafsServer struct {
	lisafs.Server
	// contains filtered or unexported fields
}

LisafsServer implements lisafs.ServerImpl for fsgofer.

func NewLisafsServer

func NewLisafsServer(config Config) *LisafsServer

NewLisafsServer initializes a new lisafs server for fsgofer.

func (*LisafsServer) MaxMessageSize

func (s *LisafsServer) MaxMessageSize() uint32

MaxMessageSize implements lisafs.ServerImpl.MaxMessageSize.

func (*LisafsServer) Mount

func (s *LisafsServer) Mount(c *lisafs.Connection, mountNode *lisafs.Node) (*lisafs.ControlFD, linux.Statx, int, error)

Mount implements lisafs.ServerImpl.Mount.

func (*LisafsServer) SupportedMessages

func (s *LisafsServer) SupportedMessages() []lisafs.MID

SupportedMessages implements lisafs.ServerImpl.SupportedMessages.

Source Files

lisafs.go

Directories

PathSynopsis
runsc/fsgofer/filterPackage filter defines all syscalls the gofer is allowed to make, and installs seccomp filters to prevent prohibited syscalls in case it's compromised.
Version
v0.0.0-20250605235530-a6711d1e1dc6 (latest)
Published
Jun 5, 2025
Platform
linux/amd64
Imports
19 packages
Last checked
44 minutes ago

Tools for package owners.