acl_calc_mask()

Calculate the group class mask for an access control list (ACL)

Synopsis:

#include <sys/acl.h>

int acl_calc_mask( acl_t *acl_p );

Arguments:

acl_p
A pointer to the ACL whose mask you want to calculate.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The acl_calc_mask() function calculates the file group mask for an ACL, as the union of the permissions granted by the ACL_GROUP (named group), ACL_GROUP_OBJ (owning group), and ACL_USER (named user) tags. If the ACL already has a mask entry, the function updates it; otherwise it adds a mask entry.

Returns:

0, or -1 if an error occurred ( errno is set).

Errors:

EINVAL
The acl_p argument isn't the address of a pointer to a valid ACL.
ENOMEM
There wasn't enough memory available to allocate space for a new mask entry.

Classification:

QNX Neutrino

This function is based on the withdrawn POSIX draft P1003.1e.

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

Last modified: 2013-12-23

comments powered by Disqus