ACL_VALID(3)
πΈ NAME (manual page ACL_VALID(3)) πΈ
okay so bestie, this page is literally about the functions that validate an ACL β acl_valid, acl_valid_fd_np, acl_valid_file_np, and acl_valid_link_np. Itβs giving βis this ACL okay?β energy π
β¨
π LIBRARY π
Standard C Library (libc, -lc) β yep, the standard C library, no cap π«Ά
β¨ SYNOPSIS β¨
#include <sys/types.h>
#include <sys/acl.h>
int
acl_valid(acl_t acl);
int
acl_valid_fd_np(int fd, acl_type_t type, acl_t acl);
int
acl_valid_file_np(const char *path_p, acl_type_t type, acl_t acl);
int
acl_valid_link_np(const char *path_p, acl_type_t type, acl_t acl);
π DESCRIPTION π
These functions check that the ACL referred to by the argument acl is valid. The POSIX.1e routine, acl_valid(), checks this validity only with POSIX.1e ACL semantics, and irrespective of the context in which the ACL is to be used. The non-portable forms, acl_valid_fd_np(), acl_valid_file_np(), and acl_valid_link_np(), allow an ACL to be checked in the context of a specific acl type, type, and file system object. In environments where additional ACL types are supported than just POSIX.1e, this makes more sense. Whereas acl_valid_file_np() will follow the symlink if the specified path is to a symlink, acl_valid_link_np() will not. π¦
For POSIX.1e semantics, the checks include:
- The three required entries (
ACL_USER_OBJ,ACL_GROUP_OBJ, andACL_OTHER) shall exist exactly once in the ACL. If the ACL contains anyACL_USER,ACL_GROUP, or any other implementation-defined entries in the file group class then oneACL_MASKentry shall also be required. The ACL shall contain at most oneACL_MASKentry. π - The qualifier field shall be unique among all entries of the same POSIX.1e ACL facility defined tag type. The tag type field shall contain valid values including any implementation-defined values. Validation of the values of the qualifier field is implementation-defined. π
The POSIX.1e acl_valid() function may reorder the ACL for the purposes of verification; the non-portable validation functions will not.
π§ͺ IMPLEMENTATION NOTES π§ͺ
π§ bestie, heads up: FreeBSD's support for POSIX.1e interfaces and features is still under development at this time.
π«Ά RETURN VALUES π«Ά
Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error. periodt. π
π¨ ERRORS π¨
If any of the following conditions occur, these functions shall return -1 and set errno to the corresponding value:
[EACCES]β Search permission is denied for a component of the path prefix, or the object exists and the process does not have appropriate access rights. π[EBADF]β Thefdargument is not a valid file descriptor.[EINVAL]β Argumentacldoes not point to a valid ACL.- One or more of the required ACL entries is not present in
acl. - The ACL contains entries that are not unique.
- The file system rejects the ACL based on fs-specific semantics issues.
- One or more of the required ACL entries is not present in
[ENAMETOOLONG]β A component of a pathname exceeded255characters, or an entire path name exceeded1023characters.[ENOENT]β The named object does not exist, or thepath_pargument points to an empty string.[ENOMEM]β Insufficient memory available to fulfill request.[EOPNOTSUPP]β The file system does not support ACL retrieval. π
π SEE ALSO π
go read these too bestie, iykyk:
π STANDARDS π
POSIX.1e is described in IEEE POSIX.1e draft 17. Discussion of the draft continues on the cross-platform POSIX.1e implementation mailing list. To join this list, see the FreeBSD POSIX.1e implementation page for more information. π
π°οΈ HISTORY π°οΈ
POSIX.1e support was introduced in FreeBSD 4.0, and development continues. β
π AUTHORS π
Robert N M Watson β iconic. π
Debian made this page, itβs dated December 29, 2002, and the manual is ACL_VALID(3) β mwah ππβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2000, 2002 Robert N. M. Watson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms