OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / acl / original / man3 / acl_get_fd.3
1 .\" Access Control Lists manual pages
2 .\"
3 .\" (C) 2002 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
4 .\"
5 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
6 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
13 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15 .\" SUCH DAMAGE.
16 .\"
17 .Dd March 23, 2002
18 .Dt ACL_GET_FD 3
19 .Os "Linux ACL"
20 .Sh NAME
21 .Nm acl_get_fd
22 .Nd get an ACL by file descriptor
23 .Sh LIBRARY
24 Linux Access Control Lists library (libacl, \-lacl).
25 .Sh SYNOPSIS
26 .In sys/types.h
27 .In sys/acl.h
28 .Ft acl_t
29 .Fn acl_get_fd "int fd"
30 .Sh DESCRIPTION
31 The
32 .Fn acl_get_fd
33 function retrieves the access ACL associated with the file referred to by
34 .Va fd .
35 The ACL is placed into working storage and
36 .Fn acl_get_fd
37 returns a pointer to that storage.
38 .Pp
39 In order to read an ACL from an object, a process must have read access to
40 the object's attributes.
41 .Pp
42 This function may cause memory to be allocated.  The caller should free any
43 releasable memory, when the new ACL is no longer required, by calling
44 .Xr acl_free 3
45 with the
46 .Va (void*)acl_t
47 returned by
48 .Fn acl_get_fd
49 as an argument.
50 .Sh RETURN VALUE
51 On success, this function shall return a pointer to the
52 working storage.  On error, a value of
53 .Li (acl_t)NULL
54 shall be returned, and
55 .Va errno
56 is set appropriately.
57 .Sh ERRORS
58 If any of the following conditions occur, the
59 .Fn acl_get_fd
60 function returns a value of
61 .Li (acl_t)NULL
62 and sets
63 .Va errno
64 to the corresponding value:
65 .Bl -tag -width Er
66 .It Bq Er EBADF
67 The
68 .Va fd
69 argument is not a valid file descriptor.
70 .It Bq Er ENOMEM
71 The ACL working storage requires more memory than is allowed by the hardware or system-imposed memory management constraints.
72 .It Bq Er ENOTSUP
73 The file system on which the file identified by
74 .Va fd
75 is located does not support ACLs, or ACLs are disabled.
76 .El
77 .Sh STANDARDS
78 IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned)
79 .Sh SEE ALSO
80 .Xr acl_free 3 ,
81 .Xr acl_get_entry 3 ,
82 .Xr acl_get_file 3 ,
83 .Xr acl_set_fd 3 ,
84 .Xr acl 5
85 .Sh AUTHOR
86 Derived from the FreeBSD manual pages written by
87 .An "Robert N M Watson" Aq rwatson@FreeBSD.org ,
88 and adapted for Linux by
89 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .