'\" te .\" 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] .TH acl_trivial 3SEC "6 Oct 2005" "SunOS 5.11" "File Access Control Library Functions" .SH NAME acl_trivial \- determine whether a file has a trivial ACL .SH SYNOPSIS .LP .nf cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lsec\fR [ \fIlibrary\fR\&.\|.\|. ] #include \fBint\fR \fBacl_trivial\fR(\fBchar *\fR\fIpath\fR); .fi .SH DESCRIPTION .sp .LP The \fBacl_trivial()\fR 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 has greater than \fBMIN_ACL_ENTRIES\fR. An NFSv4/ZFS-style ACL is trivial if it either has entries other than \fBowner@\fR, \fBgroup@\fR, and \fBeveryone@\fR, has inheritance flags set, or is not ordered in a manner that meets POSIX access control requirements. .SH RETURN VALUES .sp .LP Upon successful completion, \fBacl_trivial()\fR 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 \fBerrno\fR is set to indicate the error. .SH ERRORS .sp .LP The \fBacl_trivial()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBEACCES\fR\fR .ad .RS 10n .rt A file's ACL could not be read. .RE .sp .ne 2 .mk .na \fB\fBENOENT\fR\fR .ad .RS 10n .rt A component of \fIpath\fR does not name an existing file or \fIpath\fR is an empty string. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityEvolving _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBacl\fR(5), \fBattributes\fR(5)