diff options
Diffstat (limited to 'man/man3/acl_get_entry.3')
-rw-r--r-- | man/man3/acl_get_entry.3 | 153 |
1 files changed, 80 insertions, 73 deletions
diff --git a/man/man3/acl_get_entry.3 b/man/man3/acl_get_entry.3 index f85abf3..61e6b0e 100644 --- a/man/man3/acl_get_entry.3 +++ b/man/man3/acl_get_entry.3 @@ -14,115 +14,122 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_GET_ENTRY 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_get_entry \- get an ACL entry -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_GET_ENTRY 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_get_entry +.Nd get an ACL entry +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_get_entry (acl_t \f2acl\f3, int \f2entry_id\f3, " -.B " acl_entry_t *\f2entry_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_get_entry "acl_t acl" "int entry_id" "acl_entry_t *entry_p" +.Sh DESCRIPTION The -.B acl_get_entry +.Fn acl_get_entry function obtains a descriptor for an ACL entry as specified by -.I entry_id +.Va entry_id within the ACL indicated by the argument -.IR acl . +.Va acl . If the value of -.I entry_id +.Va entry_id is ACL_FIRST_ENTRY, then the function returns in -.I entry_p +.Va entry_p a descriptor for the first ACL entry within -.IR acl . +.Va acl . If the value of -.I entry_id +.Va entry_id is ACL_NEXT_ENTRY, then the function returns in -.I entry_p +.Va entry_p a descriptor for the next ACL entry within -.IR acl . -.PP +.Va acl . +.Pp If a call is made to -.B acl_get_entry +.Fn acl_get_entry with -.I entry_id +.Va entry_id set to ACL_NEXT_ENTRY when there has not been either an initial successful call to -.BR acl_get_entry , +.Fn acl_get_entry , or a previous successful call to -.B acl_get_entry +.Fn acl_get_entry following a call to -.BR acl_calc_mask (3), -.BR acl_copy_int (3), -.BR acl_create_entry (3), -.BR acl_delete_entry (3), -.BR acl_dup (3), -.BR acl_from_text (3), -.BR acl_get_fd (3), -.BR acl_get_file (3), -.BR acl_set_fd (3), -.BR acl_set_file (3), +.Fn acl_calc_mask , +.Fn acl_copy_int , +.Fn acl_create_entry , +.Fn acl_delete_entry , +.Fn acl_dup , +.Fn acl_from_text , +.Fn acl_get_fd , +.Fn acl_get_file , +.Fn acl_set_fd , +.Fn acl_set_file , or -.BR acl_valid (3), +.Fn acl_valid , then the effect is unspecified. -.PP +.Pp Calls to -.B acl_get_entry +.Fn acl_get_entry do not modify any ACL entries. Subsequent operations using the returned ACL entry descriptor operate on the ACL entry within the ACL in working storage. The order of all existing entries in the ACL remains unchanged. Any existing ACL entry descriptors that refer to entries within the ACL continue to refer to those entries. Any existing ACL pointers that refer to the ACL referred to by -.I acl +.Va acl continue to refer to the ACL. -.SH RETURN VALUE +.Sh RETURN VALUE If the function successfully obtains an ACL entry, the function returns a -value of 1. -If the ACL has no ACL entries, the function returns the value 0. +value of +.Li 1 . +If the ACL has no ACL entries, the function returns the value +.Li 0 . If the value of -.I entry_id +.Va entry_id is ACL_NEXT_ENTRY and the last ACL entry in the ACL has already been returned by a previous call to -.BR acl_get_entry , -the function returns the value 0 until a successful call with an -.I entry_id -of ACL_FIRST_ENTRY is made. Otherwise, the value -1 -is returned and errno is set to indicate the error. -.SH ERRORS +.Fn acl_get_entry , +the function returns the value +.Li 0 +until a successful call with an +.Va entry_id +of ACL_FIRST_ENTRY is made. Otherwise, the value +.Li -1 +is returned and +.Va errno +is set to indicate the error. +.Sh ERRORS If any of the following conditions occur, the -.B acl_get_entry -function returns -1 and sets -.B errno +.Fn acl_get_entry +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl_p +.Va acl_p is not a valid pointer to an ACL. -.TP -.SM -\%[EINVAL] +.Pp The argument -.I entry_id +.Va entry_id is neither ACL_NEXT_ENTRY nor ACL_FIRST_ENTRY. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_calc_mask 3 , +.Xr acl_create_entry 3 , +.Xr acl_copy_entry 3 , +.Xr acl_delete_entry 3 , +.Xr acl_get_file 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_create_entry (3), -.BR acl_copy_entry (3), -.BR acl_delete_entry (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . |