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 1768b23992SWarner Losh.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 1868b23992SWarner Losh.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1968b23992SWarner Losh.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2068b23992SWarner Losh.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2168b23992SWarner Losh.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2268b23992SWarner Losh.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2368b23992SWarner Losh.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2468b23992SWarner Losh.\" SUCH DAMAGE. 250f626307SChris D. Faulhaber.\" 26*c34fce8aSDag-Erling Smørgrav.Dd September 21, 2023 270f626307SChris D. Faulhaber.Dt ACL_GET_ENTRY 3 280f626307SChris D. Faulhaber.Os 290f626307SChris D. Faulhaber.Sh NAME 300f626307SChris D. Faulhaber.Nm acl_get_entry 310f626307SChris D. Faulhaber.Nd retrieve an ACL entry from an ACL 320f626307SChris D. Faulhaber.Sh LIBRARY 330f626307SChris D. Faulhaber.Lb libc 340f626307SChris D. Faulhaber.Sh SYNOPSIS 3532eef9aeSRuslan Ermilov.In sys/types.h 3632eef9aeSRuslan Ermilov.In sys/acl.h 37d2dcbe62SBruce Evans.Ft int 38fda2d391SChris D. Faulhaber.Fn acl_get_entry "acl_t acl" "int entry_id" "acl_entry_t *entry_p" 390f626307SChris D. Faulhaber.Sh DESCRIPTION 401fae73b1SRuslan ErmilovThe 410f626307SChris D. Faulhaber.Fn acl_get_entry 421fae73b1SRuslan Ermilovfunction 430f626307SChris D. Faulhaberis a POSIX.1e call that retrieves a descriptor for an ACL entry 440f626307SChris D. Faulhaberspecified by the argument 45*c34fce8aSDag-Erling Smørgrav.Fa entry_id 460f626307SChris D. Faulhaberwithin the ACL indicated by the argument 470f626307SChris D. Faulhaber.Fa acl . 480f626307SChris D. Faulhaber.Pp 490f626307SChris D. FaulhaberIf the value of 500f626307SChris D. Faulhaber.Fa entry_id 510f626307SChris D. Faulhaberis 520f626307SChris D. Faulhaber.Dv ACL_FIRST_ENTRY , 530f626307SChris D. Faulhaberthen the function will return in 540f626307SChris D. Faulhaber.Fa entry_p 550f626307SChris D. Faulhabera descriptor for the first ACL entry within 560f626307SChris D. Faulhaber.Fa acl . 570f626307SChris D. FaulhaberIf a call is made to 580f626307SChris D. Faulhaber.Fn acl_get_entry 590f626307SChris D. Faulhaberwith 600f626307SChris D. Faulhaber.Fa entry_id 610f626307SChris D. Faulhaberset to 620f626307SChris D. Faulhaber.Dv ACL_NEXT_ENTRY 630f626307SChris D. Faulhaberwhen there has not been either an initial successful call to 640f626307SChris D. Faulhaber.Fn acl_get_entry , 656fb9b618SGiorgos Keramidasor a previous successful call to 660f626307SChris D. Faulhaber.Fn acl_create_entry , 670f626307SChris D. Faulhaber.Fn acl_delete_entry , 680f626307SChris D. Faulhaber.Fn acl_dup , 690f626307SChris D. Faulhaber.Fn acl_from_text , 700f626307SChris D. Faulhaber.Fn acl_get_fd , 710f626307SChris D. Faulhaber.Fn acl_get_file , 720f626307SChris D. Faulhaber.Fn acl_set_fd , 730f626307SChris D. Faulhaber.Fn acl_set_file , 740f626307SChris D. Faulhaberor 750f626307SChris D. Faulhaber.Fn acl_valid , 760f626307SChris D. Faulhaberthen the result is unspecified. 770f626307SChris D. Faulhaber.Sh RETURN VALUES 780f626307SChris D. FaulhaberIf the 790f626307SChris D. Faulhaber.Fn acl_get_entry 80110e1704SRuslan Ermilovfunction successfully obtains an ACL entry, a value of 1 is returned. 810f626307SChris D. FaulhaberIf the ACL has no ACL entries, the 829af42d27SRuslan Ermilov.Fn acl_get_entry 831a0a9345SRuslan Ermilovreturns a value of 0. 841a0a9345SRuslan ErmilovIf the value of 850f626307SChris D. Faulhaber.Fa entry_id 860f626307SChris D. Faulhaberis 870f626307SChris D. Faulhaber.Dv ACL_NEXT_ENTRY 880f626307SChris D. Faulhaberand the last ACL entry in the ACL has already been returned by a 890f626307SChris D. Faulhaberprevious call to 900f626307SChris D. Faulhaber.Fn acl_get_entry , 910f626307SChris D. Faulhabera value of 0 will be returned until a successful call with 920f626307SChris D. Faulhaber.Fa entry_id 930f626307SChris D. Faulhaberof 940f626307SChris D. Faulhaber.Dv ACL_FIRST_ENTRY 951a0a9345SRuslan Ermilovis made. 961a0a9345SRuslan ErmilovOtherwise, a value of -1 will be returned and 979af42d27SRuslan Ermilovthe global variable 980f626307SChris D. Faulhaber.Va errno 990f626307SChris D. Faulhaberwill be set to indicate the error. 1000f626307SChris D. Faulhaber.Sh ERRORS 1010f626307SChris D. FaulhaberThe 1020f626307SChris D. Faulhaber.Fn acl_get_entry 103*c34fce8aSDag-Erling Smørgravfunction fails if: 1040f626307SChris D. Faulhaber.Bl -tag -width Er 1050f626307SChris D. Faulhaber.It Bq Er EINVAL 1060f626307SChris D. FaulhaberArgument 1070f626307SChris D. Faulhaber.Fa acl 1081a0a9345SRuslan Ermilovdoes not point to a valid ACL. 1091a0a9345SRuslan ErmilovArgument 1100f626307SChris D. Faulhaber.Fa entry_id 1110f626307SChris D. Faulhaberis neither 1120f626307SChris D. Faulhaber.Dv ACL_FIRST_ENTRY 1130f626307SChris D. Faulhabernor 1140f626307SChris D. Faulhaber.Dv ACL_NEXT_ENTRY . 1159af42d27SRuslan Ermilov.El 1160f626307SChris D. Faulhaber.Sh SEE ALSO 1170f626307SChris D. Faulhaber.Xr acl 3 , 1180f626307SChris D. Faulhaber.Xr acl_calc_mask 3 , 1190f626307SChris D. Faulhaber.Xr acl_create_entry 3 , 1200f626307SChris D. Faulhaber.Xr acl_delete_entry 3 , 1210f626307SChris D. Faulhaber.Xr acl_dup 3 , 1220f626307SChris D. Faulhaber.Xr acl_from_text 3 , 1230f626307SChris D. Faulhaber.Xr acl_get_fd 3 , 1240f626307SChris D. Faulhaber.Xr acl_get_file 3 , 1250f626307SChris D. Faulhaber.Xr acl_init 3 , 1260f626307SChris D. Faulhaber.Xr acl_set_fd 3 , 1270f626307SChris D. Faulhaber.Xr acl_set_file 3 , 1280f626307SChris D. Faulhaber.Xr acl_valid 3 , 1290f626307SChris D. Faulhaber.Xr posix1e 3 1300f626307SChris D. Faulhaber.Sh STANDARDS 1310f626307SChris D. FaulhaberPOSIX.1e is described in IEEE POSIX.1e draft 17. 1320f626307SChris D. Faulhaber.Sh HISTORY 1330f626307SChris D. FaulhaberPOSIX.1e support was introduced in 1340f626307SChris D. Faulhaber.Fx 4.0 . 1350f626307SChris D. FaulhaberThe 1360f626307SChris D. Faulhaber.Fn acl_get_entry 1370f626307SChris D. Faulhaberfunction was added in 1380f626307SChris D. Faulhaber.Fx 5.0 . 1390f626307SChris D. Faulhaber.Sh AUTHORS 1400f626307SChris D. FaulhaberThe 1410f626307SChris D. Faulhaber.Fn acl_get_entry 1420f626307SChris D. Faulhaberfunction was written by 1438fbf3d50SBaptiste Daroussin.An Chris D. Faulhaber Aq Mt jedgar@fxp.org . 144