xref: /freebsd/lib/libc/posix1e/acl_get_entry.3 (revision 6fb9b618f59bb8cf57ee05626515d113a8be92d3)
10f626307SChris D. Faulhaber.\"-
20f626307SChris D. Faulhaber.\" Copyright (c) 2001 Chris D. Faulhaber
30f626307SChris D. Faulhaber.\" All rights reserved.
40f626307SChris D. Faulhaber.\"
50f626307SChris D. Faulhaber.\" Redistribution and use in source and binary forms, with or without
60f626307SChris D. Faulhaber.\" modification, are permitted provided that the following conditions
70f626307SChris D. Faulhaber.\" are met:
80f626307SChris D. Faulhaber.\" 1. Redistributions of source code must retain the above copyright
90f626307SChris D. Faulhaber.\"    notice, this list of conditions and the following disclaimer.
100f626307SChris D. Faulhaber.\" 2. Redistributions in binary form must reproduce the above copyright
110f626307SChris D. Faulhaber.\"    notice, this list of conditions and the following disclaimer in the
120f626307SChris D. Faulhaber.\"    documentation and/or other materials provided with the distribution.
130f626307SChris D. Faulhaber.\"
140f626307SChris D. Faulhaber.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
150f626307SChris D. Faulhaber.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
160f626307SChris D. Faulhaber.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
170f626307SChris D. Faulhaber.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE
180f626307SChris D. Faulhaber.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
190f626307SChris D. Faulhaber.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
200f626307SChris D. Faulhaber.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
210f626307SChris D. Faulhaber.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
220f626307SChris D. Faulhaber.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
230f626307SChris D. Faulhaber.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
240f626307SChris D. Faulhaber.\" POSSIBILITY OF SUCH DAMAGE.
250f626307SChris D. Faulhaber.\"
260f626307SChris D. Faulhaber.\" $FreeBSD$
270f626307SChris D. Faulhaber.\"
280f626307SChris D. Faulhaber.Dd April 13, 2001
290f626307SChris D. Faulhaber.Dt ACL_GET_ENTRY 3
300f626307SChris D. Faulhaber.Os
310f626307SChris D. Faulhaber.Sh NAME
320f626307SChris D. Faulhaber.Nm acl_get_entry
330f626307SChris D. Faulhaber.Nd retrieve an ACL entry from an ACL
340f626307SChris D. Faulhaber.Sh LIBRARY
350f626307SChris D. Faulhaber.Lb libc
360f626307SChris D. Faulhaber.Sh SYNOPSIS
3732eef9aeSRuslan Ermilov.In sys/types.h
3832eef9aeSRuslan Ermilov.In sys/acl.h
39d2dcbe62SBruce Evans.Ft int
40fda2d391SChris D. Faulhaber.Fn acl_get_entry "acl_t acl" "int entry_id" "acl_entry_t *entry_p"
410f626307SChris D. Faulhaber.Sh DESCRIPTION
421fae73b1SRuslan ErmilovThe
430f626307SChris D. Faulhaber.Fn acl_get_entry
441fae73b1SRuslan Ermilovfunction
450f626307SChris D. Faulhaberis a POSIX.1e call that retrieves a descriptor for an ACL entry
460f626307SChris D. Faulhaberspecified by the argument
470f626307SChris D. Faulhaber.Fa entry_d
480f626307SChris D. Faulhaberwithin the ACL indicated by the argument
490f626307SChris D. Faulhaber.Fa acl .
500f626307SChris D. Faulhaber.Pp
510f626307SChris D. FaulhaberIf the value of
520f626307SChris D. Faulhaber.Fa entry_id
530f626307SChris D. Faulhaberis
540f626307SChris D. Faulhaber.Dv ACL_FIRST_ENTRY ,
550f626307SChris D. Faulhaberthen the function will return in
560f626307SChris D. Faulhaber.Fa entry_p
570f626307SChris D. Faulhabera descriptor for the first ACL entry within
580f626307SChris D. Faulhaber.Fa acl .
590f626307SChris D. FaulhaberIf a call is made to
600f626307SChris D. Faulhaber.Fn acl_get_entry
610f626307SChris D. Faulhaberwith
620f626307SChris D. Faulhaber.Fa entry_id
630f626307SChris D. Faulhaberset to
640f626307SChris D. Faulhaber.Dv ACL_NEXT_ENTRY
650f626307SChris D. Faulhaberwhen there has not been either an initial successful call to
660f626307SChris D. Faulhaber.Fn acl_get_entry ,
676fb9b618SGiorgos Keramidasor a previous successful call to
680f626307SChris D. Faulhaber.Fn acl_create_entry ,
690f626307SChris D. Faulhaber.Fn acl_delete_entry ,
700f626307SChris D. Faulhaber.Fn acl_dup ,
710f626307SChris D. Faulhaber.Fn acl_from_text ,
720f626307SChris D. Faulhaber.Fn acl_get_fd ,
730f626307SChris D. Faulhaber.Fn acl_get_file ,
740f626307SChris D. Faulhaber.Fn acl_set_fd ,
750f626307SChris D. Faulhaber.Fn acl_set_file ,
760f626307SChris D. Faulhaberor
770f626307SChris D. Faulhaber.Fn acl_valid ,
780f626307SChris D. Faulhaberthen the result is unspecified.
790f626307SChris D. Faulhaber.Sh RETURN VALUES
800f626307SChris D. FaulhaberIf the
810f626307SChris D. Faulhaber.Fn acl_get_entry
826fb9b618SGiorgos Keramidasfunction successfuly obtains an ACL entry, a value of 1 is returned.
830f626307SChris D. FaulhaberIf the ACL has no ACL entries, the
849af42d27SRuslan Ermilov.Fn acl_get_entry
851a0a9345SRuslan Ermilovreturns a value of 0.
861a0a9345SRuslan ErmilovIf the value of
870f626307SChris D. Faulhaber.Fa entry_id
880f626307SChris D. Faulhaberis
890f626307SChris D. Faulhaber.Dv ACL_NEXT_ENTRY
900f626307SChris D. Faulhaberand the last ACL entry in the ACL has already been returned by a
910f626307SChris D. Faulhaberprevious call to
920f626307SChris D. Faulhaber.Fn acl_get_entry ,
930f626307SChris D. Faulhabera value of 0 will be returned until a successful call with
940f626307SChris D. Faulhaber.Fa entry_id
950f626307SChris D. Faulhaberof
960f626307SChris D. Faulhaber.Dv ACL_FIRST_ENTRY
971a0a9345SRuslan Ermilovis made.
981a0a9345SRuslan ErmilovOtherwise, a value of -1 will be returned and
999af42d27SRuslan Ermilovthe global variable
1000f626307SChris D. Faulhaber.Va errno
1010f626307SChris D. Faulhaberwill be set to indicate the error.
1020f626307SChris D. Faulhaber.Sh ERRORS
1030f626307SChris D. FaulhaberThe
1040f626307SChris D. Faulhaber.Fn acl_get_entry
1050f626307SChris D. Faulhaberfails if:
1060f626307SChris D. Faulhaber.Bl -tag -width Er
1070f626307SChris D. Faulhaber.It Bq Er EINVAL
1080f626307SChris D. FaulhaberArgument
1090f626307SChris D. Faulhaber.Fa acl
1101a0a9345SRuslan Ermilovdoes not point to a valid ACL.
1111a0a9345SRuslan ErmilovArgument
1120f626307SChris D. Faulhaber.Fa entry_id
1130f626307SChris D. Faulhaberis neither
1140f626307SChris D. Faulhaber.Dv ACL_FIRST_ENTRY
1150f626307SChris D. Faulhabernor
1160f626307SChris D. Faulhaber.Dv ACL_NEXT_ENTRY .
1179af42d27SRuslan Ermilov.El
1180f626307SChris D. Faulhaber.Sh SEE ALSO
1190f626307SChris D. Faulhaber.Xr acl 3 ,
1200f626307SChris D. Faulhaber.Xr acl_calc_mask 3 ,
1210f626307SChris D. Faulhaber.Xr acl_create_entry 3 ,
1220f626307SChris D. Faulhaber.Xr acl_delete_entry 3 ,
1230f626307SChris D. Faulhaber.Xr acl_dup 3 ,
1240f626307SChris D. Faulhaber.Xr acl_from_text 3 ,
1250f626307SChris D. Faulhaber.Xr acl_get_fd 3 ,
1260f626307SChris D. Faulhaber.Xr acl_get_file 3 ,
1270f626307SChris D. Faulhaber.Xr acl_init 3 ,
1280f626307SChris D. Faulhaber.Xr acl_set_fd 3 ,
1290f626307SChris D. Faulhaber.Xr acl_set_file 3 ,
1300f626307SChris D. Faulhaber.Xr acl_valid 3 ,
1310f626307SChris D. Faulhaber.Xr posix1e 3
1320f626307SChris D. Faulhaber.Sh STANDARDS
1330f626307SChris D. FaulhaberPOSIX.1e is described in IEEE POSIX.1e draft 17.
1340f626307SChris D. Faulhaber.Sh HISTORY
1350f626307SChris D. FaulhaberPOSIX.1e support was introduced in
1360f626307SChris D. Faulhaber.Fx 4.0 .
1370f626307SChris D. FaulhaberThe
1380f626307SChris D. Faulhaber.Fn acl_get_entry
1390f626307SChris D. Faulhaberfunction was added in
1400f626307SChris D. Faulhaber.Fx 5.0 .
1410f626307SChris D. Faulhaber.Sh AUTHORS
1420f626307SChris D. FaulhaberThe
1430f626307SChris D. Faulhaber.Fn acl_get_entry
1440f626307SChris D. Faulhaberfunction was written by
1450f626307SChris D. Faulhaber.An Chris D. Faulhaber Aq jedgar@fxp.org .
146