caps

package
v0.0.0-...-7c31ad9 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Provides helper functions for checking if we have some functional sets of capabilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fulcrum

type Fulcrum struct {
	// contains filtered or unexported fields
}

func Scan

func Scan() *Fulcrum

func (Fulcrum) CanManageOwnership

func (f Fulcrum) CanManageOwnership() bool

Whether we have enough caps to confidently use materialize files with ownership info. This requires "have CAP_CHOWN", but also "have CAP_FOWNER" (because we need this cap in order to be able to set mtimes on files *after having chown'd them*); or, on mac, is uid==0.

func (Fulcrum) CanMountAny

func (f Fulcrum) CanMountAny() bool

Whether we have enough caps to confidently use *any* kind of mounts. This requires "have CAP_SYS_ADMIN", because mounts are typically considered a very powerful operation on linux, or, on mac, is uid==0. (This is distinct from "CanMountBind" because some recursive container situations may have a whitelist allowing bind mounts, but not others like e.g. "aufs".)

func (Fulcrum) CanMountBind

func (f Fulcrum) CanMountBind() bool

Whether we have enough caps to confidently use bind mounts. This requires "have CAP_SYS_ADMIN", because mounts are typically considered a very powerful operation on linux, or, on mac, is uid==0. (Future work: user namespaces may also under some conditions allow *specifically* *bind* mounts. We don't yet support it because it's fiddly and seems to be something of a moving target in terms of kernel support in the wild; lots of testing needed.)

func (Fulcrum) CanShareIOCache

func (f Fulcrum) CanShareIOCache() bool

Whether we have enough caps to confidently access all of `$RIO_BASE/*`. We sum this up as "have CAP_DAC_OVERRIDE"; or, on mac, is uid==0.

Jump to

Keyboard shortcuts

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