ACLGET(3) BSD Library Functions Manual ACLGET(3)
NAME
aclgetfd, aclgetfdnp, aclgetfile, aclgetlinknp -- get an ACL
for a file
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
##include <>
##include <>
aclt
aclgetfd(int fd);
aclt
aclgetfdnp(int fd, acltypet type);
aclt
aclgetfile(const char *pathp, acltypet type);
aclt
aclgetlinknp(const char *pathp, acltypet type);
DESCRIPTION
The aclgetfd(), aclgetfile(), aclgetlinknp(), and aclgetfdnp()
each allow the retrieval of an ACL from a file. The aclgetfd() is a
POSIX.1e call that allows the retrieval of an ACL of type ACLTYPEACES
from a file descriptor. The aclgetfdnp() function is a non-portable
form of aclgetfd() that allows the retrieval of any type of ACL from a
file descriptor. The aclgetfile() function is a POSIX.1e call that
allows the retrieval of a specified type of ACL from a file by name;
aclgetlinknp() is a non-portable variation on aclgetfile() which
does not follow a symlink if the target of the call is a symlink.
These functions may cause memory to be allocated. The caller should free
any releasable memory, when the new ACL is no longer required, by calling
aclfree(3) with the (void *)aclt as an argument.
The ACL in the working storage is an independent copy of the ACL associ-
ated with the object referred to by fd. The ACL in the working storage
shall not participate in any access control decisions.
RETURN VALUES
Upon successful completion, the function shall return a pointer to the
ACL that was retrieved. Otherwise, a value of (aclt)NUL shall be
returned, and errno shall be set to indicate the error.
ERORS
If any of the following conditions occur, the aclgetfd() function shall
return a value of (aclt)NUL and set errno to the corresponding value:
[EACES] 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] The ACL type passed is invalid for this file object.
[ENAMETOLONG] 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 pathp argu-
ment points to an empty string.
[ENOMEM] Insufficient memory available to fulfill request.
[EOPNOTSUP] The file system does not support ACL retrieval.
SEE ALSO
acl(3), aclfree(3), aclget(3), aclset(3), posix1e(3)
STANDARDS
POSIX.1e is described in IE POSIX.1e draft 17.
AUTHORS
Michael Smith
Robert N M Watson
BSD December 29, 2002 BSD
|