acl_get_file()

Get the ACL for a given path

Synopsis:

#include <sys/acl.h>

acl_t acl_get_file( const char *path_p,
                    acl_type_t type );

Since:

BlackBerry 10.0.0

Arguments:

path_p
The path that you want to get the ACL for.
type
The type of ACL; this must currently be ACL_TYPE_ACCESS.

Library:

libc

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

Description:

The acl_get_file() function gets the ACL associated with the given file or directory, copies it into working storage, and returns a pointer to that storage. When you're finished with the ACL, you should call acl_free() to release it.

The ACL in working storage is independent of the file or directory's ACL. Changes that you make to the copy in working storage don't affect the file or directory's ACL.

Returns:

A pointer to the ACL in working storage, or NULL if an error occurred ( errno is set).

Errors:

EACCES
Search permission was denied for a component of the path prefix, or the object exists and the process doesn't have the appropriate access rights.
EINVAL
The type argument isn't ACL_TYPE_ACCESS.
ENAMETOOLONG
The length of the path_p argument exceeds PATH_MAX.
ENOENT
The named object doesn't exist, or path_p is an empty string.
ENOMEM
There wasn't enough memory available to create the ACL in working storage.
ENOTDIR
A component of the path prefix isn't a directory.

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-06-24



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

comments powered by Disqus