ACL(9) BSD Kernel Developer's Manual ACL(9)NAMEacl — virtual file system access control lists
SYNOPSIS
#include <sys/param.h>
#include <sys/vnode.h>
#include <sys/acl.h>
typedef int acl_type_t;
typedef int acl_tag_t;
typedef mode_t acl_perm_t;
struct acl_entry {
acl_tag_t ae_tag;
uid_t ae_id;
acl_perm_t ae_perm;
};
typedef struct acl_entry *acl_entry_t;
struct acl {
int acl_cnt;
struct acl_entry acl_entry[ACL_MAX_ENTRIES];
};
typedef struct acl *acl_t;
/*
* Possible valid values for a_tag of acl_entry_t
*/
#define ACL_USER_OBJ 0x00000001
#define ACL_USER 0x00000002
#define ACL_GROUP_OBJ 0x00000004
#define ACL_GROUP 0x00000008
#define ACL_MASK 0x00000010
#define ACL_OTHER 0x00000020
#define ACL_OTHER_OBJ ACL_OTHER
/*
* Possible valid values a_type_t arguments
*/
#define ACL_TYPE_ACCESS 0x00000000
#define ACL_TYPE_DEFAULT 0x00000001
#define ACL_TYPE_AFS 0x00000002
#define ACL_TYPE_CODA 0x00000003
#define ACL_TYPE_NTFS 0x00000004
#define ACL_TYPE_NWFS 0x00000005
/*
* Possible flags in a_perm field
*/
#define ACL_PERM_EXEC 0x0001
#define ACL_PERM_WRITE 0x0002
#define ACL_PERM_READ 0x0004
#define ACL_PERM_NONE 0x0000
#define ACL_PERM_BITS (ACL_PERM_EXEC | ACL_PERM_WRITE | ACL_PERM_READ)
#define ACL_POSIX1E_BITS (ACL_PERM_EXEC | ACL_PERM_WRITE | ACL_PERM_READ)
DESCRIPTION
Access control lists, or ACLs, allow fine-grained specification of rights
for vnodes representing files and directories. However, as there are a
plethora of file systems with differing ACL semantics, the vnode inter‐
face is aware only of the syntax of ACLs, relying on the underlying file
system to implement the details. Depending on the underlying file sys‐
tem, each file or directory may have zero or more ACLs associated with
it, named using the type field of the appropriate vnode ACL calls,
VOP_ACLCHECK(9), VOP_GETACL(9), and VOP_SETACL(9).
Currently, each ACL is represented in-kernel by a fixed-size acl struc‐
ture. An ACL is constructed from a fixed size array of ACL entries, each
of which consists of a set of permissions, principal namespace, and prin‐
cipal identifier. Zero or more of these entries may be "defined",
depending on the value of the associated acl_cnt field.
SEE ALSOVFS(9), VOP_ACLCHECK(9), VOP_GETACL(9), VOP_SETACL(9)AUTHORS
This man page was written by Robert Watson.
BSD December 23, 1999 BSD