xref: /netbsd-src/lib/libc/posix1e/acl_strip_np.3 (revision 1b3734281f17fd86d3db0e29f84ea9985be6fe06)
1.\" $NetBSD: acl_strip_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_strip_np.3 267774 2014-06-23 08:25:03Z bapt $
30.\"
31.Dd June 25, 2009
32.Dt ACL_STRIP_NP 3
33.Os
34.Sh NAME
35.Nm acl_strip_np
36.Nd strip extended entries from an ACL
37.Sh LIBRARY
38.Lb libc
39.Sh SYNOPSIS
40.In sys/types.h
41.In sys/acl.h
42.Ft acl_t
43.Fn acl_strip_np "const acl_t acl" "int recalculate_mask"
44.Sh DESCRIPTION
45The
46.Fn acl_strip_np
47function returns a pointer to a trivial ACL computed from the ACL pointed
48to by the argument
49.Va acl .
50.Pp
51This function may cause memory to be allocated.
52The caller should free any
53releasable memory, when the new ACL is no longer required, by calling
54.Xr acl_free 3
55with the
56.Va (void*)acl_t
57as an argument.
58.Pp
59Any existing ACL pointers that refer to the ACL referred to by
60.Va acl
61shall continue to refer to the ACL.
62.Sh RETURN VALUES
63Upon successful completion, this function shall return a pointer to the
64newly allocated ACL.
65Otherwise, a value of
66.Va (acl_t)NULL
67shall be returned, and
68.Va errno
69shall be set to indicate the error.
70.Sh ERRORS
71If any of the following conditions occur, the
72.Fn acl_init
73function shall return a value of
74.Va (acl_t)NULL
75and set
76.Va errno
77to the corresponding value:
78.Bl -tag -width Er
79.It Bq Er EINVAL
80Argument
81.Va acl
82does not point to a valid ACL.
83.It Bq Er ENOMEM
84The
85.Va acl_t
86to be returned requires more memory than is allowed by the hardware or
87system-imposed memory management constraints.
88.El
89.Sh SEE ALSO
90.Xr acl 3 ,
91.Xr acl_is_trivial_np 3 ,
92.Xr posix1e 3
93.Sh STANDARDS
94POSIX.1e is described in IEEE POSIX.1e draft 17.
95Discussion
96of the draft continues on the cross-platform POSIX.1e implementation
97mailing list.
98To join this list, see the
99.Fx
100POSIX.1e implementation
101page for more information.
102.Sh HISTORY
103POSIX.1e support was introduced in
104.Fx 4.0 .
105The
106.Fn acl_strip_np
107function was added in
108.Fx 8.0 .
109.Sh AUTHORS
110.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org
111