Documentation
¶
Overview ¶
Package acl implements just enough POSIX.1e ACL handling for default-ACL INHERITANCE on file creation. Enforcement of explicit ACLs is the kernel's job (the mount advertises CAP_POSIX_ACL and reads/writes the system.posix_acl_access / system.posix_acl_default xattrs through mlfs's generic xattr store). But under raw FUSE the kernel delegates default-ACL inheritance to the filesystem, so on create we must compute the child's access ACL + mode from the parent directory's default ACL. This is a POSIX ACL creation and inheritance rules (fs/posix_acl.c), operating on the on-disk xattr binary format.
Index ¶
Constants ¶
const ( TagUserObj uint16 = 0x01 TagUser uint16 = 0x02 TagGroupObj uint16 = 0x04 TagGroup uint16 = 0x08 TagMask uint16 = 0x10 TagOther uint16 = 0x20 )
Entry tags (uapi/linux/posix_acl.h).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL []Entry
ACL is an ordered list of entries (as stored in the xattr).
func Create ¶
Create computes a child's inherited state from a parent directory's default ACL and the requested mode:
- newMode is the child's effective mode after masking by the default ACL.
- access is the child's system.posix_acl_access ACL, or nil when the ACL is equivalent to the plain mode bits (then mode alone suffices).
The caller additionally copies the parent default ACL onto a child DIRECTORY's system.posix_acl_default (handled outside this function).