Set the access ACL for the object associated with a file descriptor
#include <sys/acl.h> int acl_set_fd( int fd, acl_t acl );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The acl_set_fd() function sets the access ACL for an object associated with a file descriptor. The calling process's effective user ID must match the owner of the directory, or the process must have appropriate privileges in order to set the ACL. The ACL must also be valid, as defined by acl_valid().
If this function succeeds, the object's file permission bits might change; if it fails, the object's ACL and file permission bits aren't changed.
0, or -1 if an error occurred (errno is set).
This function is based on the withdrawn POSIX draft P1003.1e.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |