xref: /netbsd-src/lib/libc/posix1e/acl_is_trivial_np.3 (revision 1b3734281f17fd86d3db0e29f84ea9985be6fe06)
1.\" $NetBSD: acl_is_trivial_np.3,v 1.2 2020/06/18 19:46:34 wiz Exp $
2.\"-
3.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala
4.\" All rights reserved.
5.\"
6.\" This software was developed by Robert Watson for the TrustedBSD Project.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
29.\" $FreeBSD: head/lib/libc/posix1e/acl_is_trivial_np.3 267774 2014-06-23 08:25:03Z bapt $
30.\"
31.Dd November 12, 2013
32.Dt ACL_STRIP_NP 3
33.Os
34.Sh NAME
35.Nm acl_is_trivial_np
36.Nd determine whether ACL is trivial
37.Sh LIBRARY
38.Lb libc
39.Sh SYNOPSIS
40.In sys/types.h
41.In sys/acl.h
42.Ft int
43.Fn acl_is_trivial_np "const acl_t aclp" "int *trivialp"
44.Sh DESCRIPTION
45The
46.Fn acl_is_trivial
47function determines whether the ACL pointed to by the argument
48.Va acl
49is trivial.
50Upon successful completion, the location referred to by the argument
51.Fa trivialp
52will be set to 1, if the ACL
53.Fa aclp
54points to is trivial, or 0 if it's not.
55.Pp
56ACL is trivial if it can be fully expressed as a file mode without losing
57any access rules.
58For POSIX.1e ACLs, ACL is trivial if it has the three required entries,
59one for owner, one for owning group, and one for other.
60For NFSv4 ACLs, ACL is trivial if it is identical to the ACL generated by
61.Fn acl_strip_np 3 .
62Files that have non-trivial ACL have a plus sign appended after mode bits
63in "ls -l" output.
64.Sh RETURN VALUES
65.Rv -std acl_get_tag_type
66.Sh SEE ALSO
67.Xr acl 3 ,
68.Xr posix1e 3
69.Sh STANDARDS
70POSIX.1e is described in IEEE POSIX.1e draft 17.
71Discussion
72of the draft continues on the cross-platform POSIX.1e implementation
73mailing list.
74To join this list, see the
75.Fx
76POSIX.1e implementation
77page for more information.
78.Sh HISTORY
79POSIX.1e support was introduced in
80.Fx 4.0 .
81The
82.Fn acl_is_trivial_np
83function was added in
84.Fx 8.0 .
85.Sh AUTHORS
86.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org
87