uidgid

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2018 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustGetMaxValidGID

func MustGetMaxValidGID() int

func MustGetMaxValidUID

func MustGetMaxValidUID() int

func NewTranslator

func NewTranslator(mapper Mapper) *translator

func Supported

func Supported() bool

Types

type IDMap

type IDMap string

func (IDMap) MaxValid

func (u IDMap) MaxValid() (int, error)

func (IDMap) Supported

func (u IDMap) Supported() bool

type Mapper

type Mapper interface {
	Map(int, int) (int, int)
	Apply(*exec.Cmd)
}

func NewPrivilegedMapper

func NewPrivilegedMapper() Mapper

func NewUnprivilegedMapper

func NewUnprivilegedMapper() Mapper

type Namespacer

type Namespacer interface {
	NamespacePath(logger lager.Logger, path string) error
	NamespaceCommand(cmd *exec.Cmd)
}

type NoopNamespacer

type NoopNamespacer struct{}

func (NoopNamespacer) NamespaceCommand

func (NoopNamespacer) NamespaceCommand(cmd *exec.Cmd)

func (NoopNamespacer) NamespacePath

func (NoopNamespacer) NamespacePath(lager.Logger, string) error

type ParseError

type ParseError struct {
	Line string
	Err  error
}

func (ParseError) Error

func (p ParseError) Error() string

type Translator

type Translator interface {
	TranslatePath(path string, info os.FileInfo, err error) error
	TranslateCommand(*exec.Cmd)
}

type UidNamespacer

type UidNamespacer struct {
	Translator Translator
	Logger     lager.Logger
}

func (*UidNamespacer) NamespaceCommand

func (n *UidNamespacer) NamespaceCommand(cmd *exec.Cmd)

func (*UidNamespacer) NamespacePath

func (n *UidNamespacer) NamespacePath(logger lager.Logger, rootfsPath string) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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