Tizen 2.0 Release
[framework/base/acl.git] / man / man3 / acl_set_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_SET_FD 3
26 .Os "Linux ACL"
27 .Sh NAME
28 .Nm acl_set_fd
29 .Nd set an 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 sys/acl.h
35 .Ft int
36 .Fn acl_set_fd "int fd" "acl_t acl"
37 .Sh DESCRIPTION
38 The
39 .Fn acl_set_fd
40 function associates an access ACL with the file referred to by
41 .Va fd .
42 .Pp
43 The effective user ID of the process must match the owner of the file or the process must have the CAP_FOWNER capability for the request to succeed.
44 .Sh RETURN VALUE
45 .Rv -std acl_set_fd
46 .Sh ERRORS
47 If any of the following conditions occur, the
48 .Fn acl_set_fd
49 function returns the value
50 .Li -1
51 and and sets
52 .Va errno
53 to the corresponding value:
54 .Bl -tag -width Er
55 .It Bq Er EBADF
56 The
57 .Va fd
58 argument is not a valid file descriptor.
59 .It Bq Er EINVAL
60 The argument
61 .Va acl
62 does not point to a valid ACL.
63 .Pp
64 The ACL has more entries than the file referred to by
65 .Va fd
66 can obtain.
67 .It Bq Er ENOSPC
68 The directory or file system that would contain the new ACL cannot be extended or the file system is out of file allocation resources.
69 .It Bq Er ENOTSUP
70 The file identified by
71 .Va fd 
72 cannot be associated with the ACL because the file system on which the file
73 is located does not support this.
74 .It Bq Er EPERM
75 The process does not have appropriate privilege to perform the operation to set the ACL.
76 .It Bq Er EROFS
77 This function requires modification of a file system which is currently read-only.
78 .El
79 .Sh STANDARDS
80 IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned)
81 .Sh SEE ALSO
82 .Xr acl_delete_def_file 3 ,
83 .Xr acl_get_file 3 ,
84 .Xr acl_set_file 3 ,
85 .Xr acl_valid 3 ,
86 .Xr acl 5
87 .Sh AUTHOR
88 Derived from the FreeBSD manual pages written by
89 .An "Robert N M Watson" Aq rwatson@FreeBSD.org ,
90 and adapted for Linux by
91 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .