Documentation ¶
Overview ¶
Package acl provides an interface to Posix.1e Access Control Lists as well as additional ACL implementations (NFS).
Index ¶
- Constants
- func DeleteDefaultACL(path string) error
- type ACL
- func (acl *ACL) AddEntry(entry *Entry) error
- func (acl *ACL) CalcMask() error
- func (acl *ACL) CopyExt(buffer []byte) (int64, error)
- func (acl *ACL) CreateEntry() (*Entry, error)
- func (acl *ACL) DeleteEntry(entry *Entry) error
- func (acl *ACL) Dup() (*ACL, error)
- func (acl *ACL) FirstEntry() *Entry
- func (acl *ACL) Free()
- func (acl *ACL) NextEntry() *Entry
- func (acl *ACL) SetFileAccess(path string) error
- func (acl *ACL) SetFileDefault(path string) error
- func (acl *ACL) Size() int64
- func (acl *ACL) String() string
- func (acl *ACL) Valid() bool
- type Entry
- func (entry *Entry) Copy() (*Entry, error)
- func (entry *Entry) GetPermset() (*Permset, error)
- func (entry *Entry) GetQualifier() (int, error)
- func (entry *Entry) GetTag() (Tag, error)
- func (entry *Entry) SetPermset(pset *Permset) error
- func (entry *Entry) SetQualifier(id int) error
- func (entry *Entry) SetTag(t Tag) error
- type Gid
- type Perm
- type Permset
- type Tag
- type Type
- type Uid
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func DeleteDefaultACL ¶
DeleteDefaultACL removes the default ACL from the specified path. Unsupported on Mac OS X.
Types ¶
type ACL ¶
type ACL struct {
// contains filtered or unexported fields
}
ACL represents an Access Control List.
func GetFileAccess ¶
GetFileAccess returns the access ACL associated with the given file path.
func GetFileDefault ¶
GetFileDefault returns the default ACL associated with the given file path.
func (*ACL) CreateEntry ¶
CreateEntry creates a new, empty Entry in the ACL.
func (*ACL) DeleteEntry ¶
DeleteEntry removes a specific Entry from the ACL.
func (*ACL) FirstEntry ¶
FirstEntry returns the first entry in the ACL, or nil of there are no more entries.
func (*ACL) NextEntry ¶
NextEntry returns the next entry in the ACL, or nil of there are no more entries.
func (*ACL) SetFileAccess ¶
SetFileAccess applies the access ACL to a file.
func (*ACL) SetFileDefault ¶
SetFileDefault applies the default ACL to a file.
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
Entry is an entry in an ACL.
func (*Entry) GetPermset ¶
GetPermset returns the permission for an Entry.
func (*Entry) GetQualifier ¶
GetQualifier returns the Uid or Gid the entry applies to.
func (*Entry) SetPermset ¶
SetPermset sets the permissions for an ACL Entry.
func (*Entry) SetQualifier ¶
SetQualifier sets the Uid or Gid the entry applies to.
type Permset ¶
type Permset struct {
// contains filtered or unexported fields
}
Permset is a collection of permissions.
func (*Permset) ClearPerms ¶
ClearPerms removes all permissions from a Permset.
func (*Permset) DeletePerm ¶
DeletePerm removes a single permission from a Permset.