xref: /freebsd/lib/libc/posix1e/acl_init.3 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1a889d1fbSRobert Watson.\"-
2e4c3e988SRobert Watson.\" Copyright (c) 2000, 2002 Robert N. M. Watson
3a889d1fbSRobert Watson.\" All rights reserved.
4a889d1fbSRobert Watson.\"
5e4c3e988SRobert Watson.\" This software was developed by Robert Watson for the TrustedBSD Project.
6e4c3e988SRobert Watson.\"
7a889d1fbSRobert Watson.\" Redistribution and use in source and binary forms, with or without
8a889d1fbSRobert Watson.\" modification, are permitted provided that the following conditions
9a889d1fbSRobert Watson.\" are met:
10a889d1fbSRobert Watson.\" 1. Redistributions of source code must retain the above copyright
11a889d1fbSRobert Watson.\"    notice, this list of conditions and the following disclaimer.
12a889d1fbSRobert Watson.\" 2. Redistributions in binary form must reproduce the above copyright
13a889d1fbSRobert Watson.\"    notice, this list of conditions and the following disclaimer in the
14a889d1fbSRobert Watson.\"    documentation and/or other materials provided with the distribution.
15a889d1fbSRobert Watson.\"
16a889d1fbSRobert Watson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17a889d1fbSRobert Watson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18a889d1fbSRobert Watson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19a889d1fbSRobert Watson.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20a889d1fbSRobert Watson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21a889d1fbSRobert Watson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22a889d1fbSRobert Watson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23a889d1fbSRobert Watson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24a889d1fbSRobert Watson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25a889d1fbSRobert Watson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26a889d1fbSRobert Watson.\" SUCH DAMAGE.
27a889d1fbSRobert Watson.\"
28a889d1fbSRobert Watson.Dd January 28, 2000
29a889d1fbSRobert Watson.Dt ACL_INIT 3
30a307d598SRuslan Ermilov.Os
31a889d1fbSRobert Watson.Sh NAME
32a889d1fbSRobert Watson.Nm acl_init
33f75b050cSAlexey Zelkin.Nd initialize ACL working storage
34f75b050cSAlexey Zelkin.Sh LIBRARY
3531acc836SRuslan Ermilov.Lb libc
36a889d1fbSRobert Watson.Sh SYNOPSIS
3732eef9aeSRuslan Ermilov.In sys/types.h
3832eef9aeSRuslan Ermilov.In sys/acl.h
39a889d1fbSRobert Watson.Ft acl_t
40a889d1fbSRobert Watson.Fn acl_init "int count"
41a889d1fbSRobert Watson.Sh DESCRIPTION
42a889d1fbSRobert WatsonThe
43a889d1fbSRobert Watson.Fn acl_init
44a889d1fbSRobert Watsonfunction allocates and initializes the working storage for an ACL of at
45a889d1fbSRobert Watsonleast
46a889d1fbSRobert Watson.Va count
471a0a9345SRuslan ErmilovACL entries.
481a0a9345SRuslan ErmilovA pointer to the working storage is returned.
491a0a9345SRuslan ErmilovThe working
50a889d1fbSRobert Watsonstorage allocated to contain the ACL is freed by a call to
51a889d1fbSRobert Watson.Xr acl_free 3 .
52a910f192SDima DorfmanWhen the area is first allocated, it shall contain an ACL that contains
53a889d1fbSRobert Watsonno ACL entries.
5442635956SRuslan Ermilov.Pp
551a0a9345SRuslan ErmilovThis function may cause memory to be allocated.
561a0a9345SRuslan ErmilovThe caller should free any
57c32381adSMike Pritchardreleasable memory, when the new ACL is no longer required, by calling
58a889d1fbSRobert Watson.Xr acl_free 3
59a889d1fbSRobert Watsonwith the
60a889d1fbSRobert Watson.Va (void*)acl_t
61a889d1fbSRobert Watsonas an argument.
62a889d1fbSRobert Watson.Sh IMPLEMENTATION NOTES
63b5c508fbSRuslan Ermilov.Fx Ns 's
64b5c508fbSRuslan Ermilovsupport for POSIX.1e interfaces and features is still under
65a889d1fbSRobert Watsondevelopment at this time.
66a889d1fbSRobert Watson.Sh RETURN VALUES
67a889d1fbSRobert WatsonUpon successful completion, this function shall return a pointer to the
681a0a9345SRuslan Ermilovworking storage.
691a0a9345SRuslan ErmilovOtherwise, a value of
70a889d1fbSRobert Watson.Va (acl_t)NULL
71a889d1fbSRobert Watsonshall be returned, and
72a889d1fbSRobert Watson.Va errno
73a889d1fbSRobert Watsonshall be set to indicate the error.
74a889d1fbSRobert Watson.Sh ERRORS
75a889d1fbSRobert WatsonIf any of the following conditions occur, the
76a889d1fbSRobert Watson.Fn acl_init
77a889d1fbSRobert Watsonfunction shall return a value of
78a889d1fbSRobert Watson.Va (acl_t)NULL
79a889d1fbSRobert Watsonand set
80a889d1fbSRobert Watson.Va errno
81a889d1fbSRobert Watsonto the corresponding value:
82a889d1fbSRobert Watson.Bl -tag -width Er
83a889d1fbSRobert Watson.It Bq Er EINVAL
84a889d1fbSRobert WatsonThe value of count is less than zero.
85a889d1fbSRobert Watson.It Bq Er ENOMEM
86a889d1fbSRobert WatsonThe
87a889d1fbSRobert Watson.Va acl_t
88a889d1fbSRobert Watsonto be returned requires more memory than is allowed by the hardware or
89a889d1fbSRobert Watsonsystem-imposed memory management constraints.
90a889d1fbSRobert Watson.El
91a889d1fbSRobert Watson.Sh SEE ALSO
92a889d1fbSRobert Watson.Xr acl 3 ,
93a889d1fbSRobert Watson.Xr acl_free 3 ,
94a889d1fbSRobert Watson.Xr posix1e 3
95a889d1fbSRobert Watson.Sh STANDARDS
961a0a9345SRuslan ErmilovPOSIX.1e is described in IEEE POSIX.1e draft 17.
971a0a9345SRuslan ErmilovDiscussion
98a889d1fbSRobert Watsonof the draft continues on the cross-platform POSIX.1e implementation
991a0a9345SRuslan Ermilovmailing list.
1001a0a9345SRuslan ErmilovTo join this list, see the
101c32381adSMike Pritchard.Fx
102c32381adSMike PritchardPOSIX.1e implementation
103a889d1fbSRobert Watsonpage for more information.
104a889d1fbSRobert Watson.Sh HISTORY
105c32381adSMike PritchardPOSIX.1e support was introduced in
106c32381adSMike Pritchard.Fx 4.0 ,
107c32381adSMike Pritchardand development continues.
108a889d1fbSRobert Watson.Sh AUTHORS
109c32381adSMike Pritchard.An Robert N M Watson
110