Current File : //usr/share/man/man3sec/acl_trivial.3sec
'\" te
.\" Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
.TH acl_trivial 3SEC "16 Jun 2011" "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 <sys/acl.h>

\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 nontrivial if it has greater than \fBMIN_ACL_ENTRIES\fR. An NFSv4/ZFS-style ACL is nontrivial 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 StabilityCommitted
_
MT-LevelMT-Safe
.TE

.SH SEE ALSO
.sp
.LP
\fBacl\fR(5), \fBattributes\fR(5)