acl_valid()

Validate an access control list (ACL)

Synopsis:

#include <sys/acl.h>

int acl_valid( acl_t acl );

Arguments:

acl
A pointer to the ACL that you want to check.

Library:

libc

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

Description:

The acl_valid() function checks an access control list to make sure it's valid:

  • The ACL must have one each of the ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER entries.
  • If the ACL has any ACL_USER (named user) or ACL_GROUP (named group) entries, there must be one ACL_MASK entry.
  • There must not be more than one entry for the same named user or group.

Returns:

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

Errors:

EINVAL
The acl argument doesn't point to a valid ACL, the ACL is missing some of the required entries, or there are entries that aren't unique.
ENOTSUP
The ACL type isn't ACL_TYPE_ACCESS or ACL_TYPE_DEFAULT.

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