Git init
[framework/base/acl.git] / man / man3 / acl_extended_fd.3
1 .\" Access Control Lists manual pages
2 .\"
3 .\" (C) 2002 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
4 .\"
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual.  If not, see
22 .\" <http://www.gnu.org/licenses/>.
23 .\"
24 .Dd March 23, 2002
25 .Dt ACL_EXTENDED_FD 3
26 .Os "Linux ACL"
27 .Sh NAME
28 .Nm acl_extended_fd
29 .Nd test for information in the ACL by file descriptor
30 .Sh LIBRARY
31 Linux Access Control Lists library (libacl, \-lacl).
32 .Sh SYNOPSIS
33 .In sys/types.h
34 .In acl/libacl.h
35 .Ft int
36 .Fn acl_extended_fd "int fd"
37 .Sh DESCRIPTION
38 The
39 .Fn acl_extended_fd
40 function returns
41 .Li 1
42 if the file identified by the argument
43 .Va fd
44 is associated with an extended access ACL. The function returns
45 .Li 0
46 if the file does not have an extended access ACL.
47 .Pp
48 An extended ACL is an ACL that contains entries other than the three
49 required entries of tag types ACL_USER_OBJ, ACL_GROUP_OBJ and ACL_OTHER.
50 If the result of the
51 .Fn acl_extended_fd
52 function for a file object is
53 .Li 0 ,
54 then the ACL defines no discretionary access rights other than those
55 already defined by the traditional file permission bits.
56 .Pp
57 Access to the file object may be further restricted by other
58 mechanisms, such as Mandatory Access Control schemes. The
59 .Xr access 2
60 system call can be used to check whether a given type of access to a file
61 object would be granted.
62 .Sh RETURN VALUE
63 If successful, the
64 .Fn acl_extended_fd
65 function returns
66 .Li 1
67 if the file object identified by
68 .Va fd
69 has an extended access ACL, and
70 .Li 0
71 if the file object identified by
72 .Va fd
73 does not have an extended access ACL. Otherwise, the value
74 .Li -1
75 is returned and the global variable
76 .Va errno
77 is set to indicate the error.
78 .Sh ERRORS
79 If any of the following conditions occur, the
80 .Fn acl_extended_fd
81 function returns
82 .Li -1
83 and sets
84 .Va errno
85 to the corresponding value:
86 .Bl -tag -width Er
87 .It Bq Er EBADF
88 The
89 .Va fd
90 argument is not a valid file descriptor.
91 .It Bq Er ENOTSUP
92 The file system on which the file identified by
93 .Va fd
94 is located does not support ACLs, or ACLs are disabled.
95 .El
96 .Sh STANDARDS
97 This is a non-portable, Linux specific extension to the ACL manipulation
98 functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned).
99 .Sh SEE ALSO
100 .Xr access 2 ,
101 .Xr acl_get_fd 3 ,
102 .Xr acl 5
103 .Sh AUTHOR
104 Written by
105 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .