aclx_gettypes Subroutine

Purpose

Retrieves the list of ACL types supported for the file system associated with the path provided.

Library

Security Library (libc.a)

Syntax

#include <sys/acl.h>

int aclx_gettypes (Path, acl_type_list, acl_type_list_len)
char  * Path;
acl_types_list_t  * acl_type_list;
size_t  * acl_type_list_len;

Description

The aclx_gettypes subroutine helps obtain the list of ACL types supported on the particular file system. A file system can implement policies to support one to many ACL types simultaneously. The first ACL type in the list is the default ACL type for the file system. This default ACL type is used in ACL conversions if the target ACL type is not supported on the file system. Each file system object in the file system is associated with only one piece of ACL data of a particular ACL type.

Parameters

Item Description
Path Specifies the path name of the file system object within the file system for which the list of supported ACLs are being requested.
acl_type_list Specifies the pointer to a buffer space, where the list of ACL types is returned. The size of this buffer is indicated using the acl_type_list_len argument in bytes.

The supported ACL types are ACLX and NFS4.

acl_type_list_len Pointer to a buffer that specifies the length of the buffer acl_type_list in which the list of ACLs is returned by the file system. This is an input/output parameter. If the length of the buffer is not sufficient to store all the ACL types, the file system returns an error and indicates the length of the buffer required in this same area. The length is specified in bytes. If the subroutine call is successful, this field contains the number of bytes of information stored in the acl_type_list buffer. This information can be used by the caller to get the number of ACL type entries returned.

Return Values

On successful completion, the aclx_gettypes subroutine returns a value of 0. Otherwise, -1 is returned and the errno global variable is set to indicate the error.

Error Codes

The aclx_gettypes subroutine fails and the access control information for a file remains unchanged if one or more of the following is true:

Item Description
EACCES Search permission is denied on a component of the Path prefix.
EFAULT The Path parameter points to a location outside of the allocated address space of the process.
ELOOP Too many symbolic links were encountered in translating the Path parameter.
ENAMETOOLONG A component of the Path parameter exceeded 255 characters, or the entire Path parameter exceeded 1023 characters.
ENOENT A component of the Path does not exist or has the disallow truncation attribute (see the ulimit subroutine).
ENOENT The Path parameter was null.
ENOENT A symbolic link was named, but the file to which it refers does not exist.
ENOSPC The acl_type_list buffer provided is not enough to store all the ACL types supported by this file system.
ENOTDIR A component of the Path prefix is not a directory.
ESTALE The process' root or current directory is located in a virtual file system that has been unmounted.

If Network File System (NFS) is installed on your system, the acl_gettypes subroutine can also fail if the following condition is true:

Item Description
ETIMEDOUT The connection timed out.

Security

Access Control: Caller must have search permission for all components of the Path prefix.

Auditing Events: None