xref: /illumos-gate/usr/src/man/man3sec/acl_trivial.3sec (revision fb2612809ed5f2cb9109db768e63d61f6659f71b)
te
Copyright 2014 Nexenta Systems, Inc. All Rights Reserved.
Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
ACL_TRIVIAL 3SEC "Nov 24, 2014"
NAME
acl_trivial - determine whether a file has a trivial ACL
SYNOPSIS

cc [ flag.\|.\|. ] file.\|.\|. -lsec [ library.\|.\|. ]
#include <sys/acl.h>

int acl_trivial(char *path);
DESCRIPTION

The acl_trivial() function is used to determine whether a file has a trivial ACL. Whether an ACL is trivial depends on the type of the ACL. A POSIX draft ACL is trivial if it does not have more than MIN_ACL_ENTRIES entries. An NFSv4/ZFS-style ACL is trivial if it does not have entries other than owner@, group@, and everyone@, does not have inheritance flags set, and is ordered in a manner that meets POSIX access control requirements.

RETURN VALUES

Upon successful completion, acl_trivial() returns 0 if the file's ACL is trivial and 1 if the file's ACL is not trivial. If it could not be determined whether a file's ACL is trivial, -1 is returned and errno is set to indicate the error.

ERRORS

The acl_trivial() function will fail if: EACCES

A file's ACL could not be read.

ENOENT

A component of path does not name an existing file or path is an empty string.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability Evolving
MT-Level MT-Safe
SEE ALSO

acl(5), attributes(5)