[BACK]Return to acl_get_entry.3 CVS log [TXT][DIR] Up to [Development] / xfs-cmds / acl / man / man3

File: [Development] / xfs-cmds / acl / man / man3 / acl_get_entry.3 (download)

Revision 1.3, Fri Sep 10 01:18:30 2004 UTC (13 years, 1 month ago) by nathans
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines

Update Andreas' email address everywhere.

.\" Access Control Lists manual pages
.\"
.\" (C) 2002 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.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 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
.Fn acl_get_entry
function obtains a descriptor for an ACL entry as specified by
.Va entry_id
within the ACL indicated by the argument
.Va acl .
If the value of
.Va entry_id
is ACL_FIRST_ENTRY, then the function returns in
.Va entry_p
a descriptor for the first ACL entry within
.Va acl .
If the value of 
.Va entry_id 
is ACL_NEXT_ENTRY, then the function returns in
.Va entry_p 
a descriptor for the next ACL entry within
.Va acl .
.Pp
If a call is made to
.Fn acl_get_entry
with
.Va entry_id
set to ACL_NEXT_ENTRY when there has not been either an initial
successful call to
.Fn acl_get_entry ,
or a previous successful call to
.Fn acl_get_entry
following a call to
.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
.Fn acl_valid ,
then the effect is unspecified.
.Pp
Calls to
.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
.Va acl
continue to refer to the ACL.
.Sh RETURN VALUE
If the function successfully obtains an ACL entry, the function returns a
value of
.Li 1 .
If the ACL has no ACL entries, the function returns the value
.Li 0 .
If the value of
.Va entry_id
is ACL_NEXT_ENTRY and the last ACL entry in the ACL has already been
returned by a previous call to
.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
.Fn acl_get_entry
function returns
.Li -1
and sets
.Va errno
to the corresponding value:
.Bl -tag -width Er
.It Bq Er EINVAL
The argument
.Va acl_p
is not a valid pointer to an ACL.
.Pp
The argument
.Va entry_id
is neither ACL_NEXT_ENTRY nor ACL_FIRST_ENTRY.
.El
.Sh STANDARDS
IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned)
.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
.An "Robert N M Watson" Aq rwatson@FreeBSD.org ,
and adapted for Linux by
.An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .