package acl

import "github.com/coreos/rkt/pkg/acl"

Package acl is a wrapper over libacl that dlopens it instead of being linked to it. The code is based on go-acl by Joseph Naegele (https://github.com/naegelejd/go-acl).

Index

Constants

const (
	TagUserObj  Tag = C.ACL_USER_OBJ
	TagUser         = C.ACL_USER
	TagGroupObj     = C.ACL_GROUP_OBJ
	TagGroup        = C.ACL_GROUP
	TagMask         = C.ACL_MASK
	TagOther        = C.ACL_OTHER
)
const (
	PermRead    Perm = C.ACL_READ
	PermWrite        = C.ACL_WRITE
	PermExecute      = C.ACL_EXECUTE
)

Variables

var ErrSoNotFound = errors.New("unable to open a handle to libacl")

Types

type ACL

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

func InitACL

func InitACL() (*ACL, error)

InitACL dlopens libacl and returns an ACL object if successful.

func (*ACL) AddBaseEntries

func (a *ACL) AddBaseEntries(path string) error

AddBaseEntries adds the base ACL entries from the file permissions.

func (*ACL) Free

func (a *ACL) Free() error

Free frees libacl's internal structures and closes libacl.

func (*ACL) ParseACL

func (a *ACL) ParseACL(acl string) error

ParseACL parses a string representation of an ACL.

func (*ACL) SetFileACLDefault

func (a *ACL) SetFileACLDefault(path string) error

SetFileACLDefault sets the "default" ACL for path.

func (*ACL) Valid

func (a *ACL) Valid() error

Valid checks whether the ACL is valid.

type Entry

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

Entry is an entry in an ACL.

type Perm

type Perm int

Perm represents a permission in the e_perm ACL field

type Permset

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

Permset is a set of permissions.

type Tag

type Tag int

Tag represents an ACL e_tag entry

Source Files

acl.go

Version
v1.30.0 (latest)
Published
Apr 13, 2018
Platform
linux/amd64
Imports
6 packages
Last checked
29 minutes ago

Tools for package owners.