acl

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2016 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Overview

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

View Source
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
)
View Source
const (
	PermRead    Perm = C.ACL_READ
	PermWrite        = C.ACL_WRITE
	PermExecute      = C.ACL_EXECUTE
)

Variables

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

Functions

This section is empty.

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

Jump to

Keyboard shortcuts

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