Git init
[framework/base/acl.git] / man / man3 / acl_set_qualifier.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_QUALIFIER 3
26 .Os "Linux ACL"
27 .Sh NAME
28 .Nm acl_set_qualifier
29 .Nd set the qualifier of an ACL entry
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_qualifier "acl_entry_t entry_d" "const void *qualifier_p"
37 .Sh DESCRIPTION
38 The
39 .Fn acl_set_qualifier
40 function sets the qualifier of the ACL entry indicated by the argument
41 .Va entry_d
42 to the value referred to by the argument
43 .Va qualifier_p .
44 If the value of the tag type in the ACL entry referred to by
45 .Va entry_d
46 is ACL_USER, then the value referred to by
47 .Va qualifier_p
48 shall be of type
49 .Va uid_t .
50 If the value of the tag type in the ACL entry referred to by
51 .Va entry_d
52 is ACL_GROUP, then the value referred to by
53 .Va qualifier_p
54 shall be of type
55 .Va gid_t .
56 If the value of the tag type in the ACL entry referred to by
57 .Va entry_d
58 is a tag type for which a qualifier is not supported, 
59 .Fn acl_set_qualifier
60 returns an error.
61 .Pp
62 Any ACL entry descriptors that refer to the entry referred to by
63 .Va entry_d
64 continue to refer to that entry. This function may cause memory to be
65 allocated. The caller should free any releasable memory, when the ACL
66 is no longer required, by calling
67 .Fn acl_free
68 with a pointer to the ACL as argument.
69 .Sh RETURN VALUE
70 .Rv -std acl_set_qualifier
71 .Sh ERRORS
72 If any of the following conditions occur, the
73 .Fn acl_set_qualifier
74 function returns
75 .Li -1
76 and sets
77 .Va errno
78 to the corresponding value:
79 .Bl -tag -width Er
80 .It Bq Er EINVAL
81 The argument
82 .Va entry_d
83 is not a valid descriptor for an ACL entry.
84 .Pp
85 The value of the tag type in the ACL entry referenced by the argument
86 .Va entry_d
87 is neither ACL_USER nor ACL_GROUP.
88 .Pp
89 The value pointed to by the argument
90 .Va qualifier_p
91 is not valid.
92 .It Bq Er ENOMEM
93 The
94 .Fn acl_set_qualifier
95 function is unable to allocate the memory required for the ACL qualifier.
96 .El
97 .Sh STANDARDS
98 IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned)
99 .Sh SEE ALSO
100 .Xr acl_create_entry 3 ,
101 .Xr acl_free 3 ,
102 .Xr acl_get_permset 3 ,
103 .Xr acl_get_qualifier 3 ,
104 .Xr acl_get_tag_type 3 ,
105 .Xr acl_set_entry 3 ,
106 .Xr acl_set_permset 3 ,
107 .Xr acl_set_tag_type 3 ,
108 .Xr acl 5
109 .Sh AUTHOR
110 Derived from the FreeBSD manual pages written by
111 .An "Robert N M Watson" Aq rwatson@FreeBSD.org ,
112 and adapted for Linux by
113 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .