Mac Developer Library Developer
Search

 

This manual page is part of Xcode Tools version 5.0

To obtain these tools:

If you are running a version of Xcode Tools other than 5.0, view the documentation locally:

  • In Xcode

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • To learn how the manual is organized or to learn about command syntax, read the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Developer Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.




ACL_VALID(3)             BSD Library Functions Manual             ACL_VALID(3)

NAME
     acl_valid, acl_valid_fd_np, acl_valid_file_np, acl_valid_link_np -- validate an ACL

LIBRARY
     Standard C Library (libc, -lc)

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 assumes ACL_TYPE_EXTENDED, and disregard 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.

     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.  Val-idation Validation
     idation 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-porta-ble non-portable
     ble validation functions will not.

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.

ERRORS
     If any of the following conditions occur, these functions shall return -1 and set errno to the corre-sponding corresponding
     sponding 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]            The fd argument is not a valid file descriptor.

     [EINVAL]           Argument acl does 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.

     [ENAMETOOLONG]     A component of a pathname exceeded 255 characters, or an entire path name exceeded
                        1023 characters.

     [ENOENT]           The named object does not exist, or the path_p argument points to an empty string.

     [ENOMEM]           Insufficient memory available to fulfill request.

     [EOPNOTSUPP]       The file system does not support ACL retrieval.

SEE ALSO
     acl(3), acl_get(3), acl_init(3), acl_set(3), posix1e(3)

STANDARDS
     POSIX.1e is described in IEEE POSIX.1e draft 17.

AUTHORS
     Michael Smith
     Robert N M Watson

BSD                            December 29, 2002                           BSD

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Feedback