acl_from_text()

Create an access control list (ACL) from text

Synopsis:

#include <sys/acl.h>

acl_t acl_from_text( const char *buf_p );

Since:

BlackBerry 10.0.0

Arguments:

buf_p
A pointer to a buffer that contains the text form of the ACL that you want to convert.

Library:

libc

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

Description:

The acl_from_text() function converts an access control list from text form into the internal form of an ACL. This function accepts the long and short text forms of an ACL:

tag_type:qualifier:permissions

In the long form, tag_type is user, group, other, or mask, the qualifier is the name or numeric ID of a user or group, and the permissions are in the form rwx, with a hyphen (-) replacing any permissions that aren't granted.

In the short form, you can abbreviate the tag_type to its first letter, and the permissions can contain at most one each of r, w, and x, in any order.

When you're finished with the resulting ACL, you should call acl_free() to release it.

Returns:

A pointer to the internal representation of the ACL, or NULL if an error occurred ( errno is set).

Errors:

EINVAL
The contents of the buffer couldn't be converted into an ACL.
ENOMEM
There wasn't enough memory available to allocate for the ACL in working storage.

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: 2014-11-17



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus