xref: /freebsd/lib/libc/posix1e/acl_get_flag_np.3 (revision aa015c8e4ad07fbe76ec137fa491c89856b871e0)
1.\"-
2.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE
18.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24.\" POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd April 10, 2001
29.Dt ACL_GET_FLAG_NP 3
30.Os
31.Sh NAME
32.Nm acl_get_flag_np
33.Nd check if a flag is set in a flagset
34.Sh LIBRARY
35.Lb libc
36.Sh SYNOPSIS
37.In sys/types.h
38.In sys/acl.h
39.Ft int
40.Fn acl_get_flag_np "acl_flagset_t flagset_d" "acl_flag_t flag"
41.Sh DESCRIPTION
42The
43.Fn acl_get_flag_np
44function
45is a non-portable function that checks if a flag is set in
46a flagset.
47.Sh RETURN VALUES
48If the flag in
49.Fa flag
50is set in the flagset
51.Fa flagset_d ,
52a value of
531
54is returned, otherwise a value of
550
56is returned.
57.Sh ERRORS
58If any of the following conditions occur, the
59.Fn acl_get_flag_np
60function will return a value of
61\-1
62and set global variable
63.Va errno
64to the corresponding value:
65.Bl -tag -width Er
66.It Bq Er EINVAL
67Argument
68.Fa flag
69does not contain a valid ACL flag or argument
70.Fa flagset_d
71is not a valid ACL flagset.
72.El
73.Sh SEE ALSO
74.Xr acl 3 ,
75.Xr acl_add_flag_np 3 ,
76.Xr acl_clear_flags_np 3 ,
77.Xr acl_delete_flag_np 3 ,
78.Xr acl_get_flagset_np 3 ,
79.Xr acl_set_flagset_np 3 ,
80.Xr posix1e 3
81.Sh STANDARDS
82POSIX.1e is described in IEEE POSIX.1e draft 17.
83.Sh HISTORY
84POSIX.1e support was introduced in
85.Fx 4.0 .
86The
87.Fn acl_get_flag_np
88function was added in
89.Fx 8.0 .
90.Sh AUTHORS
91The
92.Fn acl_get_flag_np
93function was written by
94.An Edward Tomasz Napierala Aq trasz@FreeBSD.org .
95.\"-
96.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala
97.\" All rights reserved.
98.\"
99.\" Redistribution and use in source and binary forms, with or without
100.\" modification, are permitted provided that the following conditions
101.\" are met:
102.\" 1. Redistributions of source code must retain the above copyright
103.\"    notice, this list of conditions and the following disclaimer.
104.\" 2. Redistributions in binary form must reproduce the above copyright
105.\"    notice, this list of conditions and the following disclaimer in the
106.\"    documentation and/or other materials provided with the distribution.
107.\"
108.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
109.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
110.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
111.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE
112.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
113.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
114.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
115.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
116.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
117.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
118.\" POSSIBILITY OF SUCH DAMAGE.
119.\"
120.\" $FreeBSD$
121.\"
122.Dd April 10, 2001
123.Dt ACL_GET_FLAG_NP 3
124.Os
125.Sh NAME
126.Nm acl_get_flag_np
127.Nd check if a flag is set in a flagset
128.Sh LIBRARY
129.Lb libc
130.Sh SYNOPSIS
131.In sys/types.h
132.In sys/acl.h
133.Ft int
134.Fn acl_get_flag_np "acl_flagset_t flagset_d" "acl_flag_t flag"
135.Sh DESCRIPTION
136The
137.Fn acl_get_flag_np
138function
139is a non-portable function that checks if a flag is set in
140a flagset.
141.Sh RETURN VALUES
142If the flag in
143.Fa flag
144is set in the flagset
145.Fa flagset_d ,
146a value of
1471
148is returned, otherwise a value of
1490
150is returned.
151.Sh ERRORS
152If any of the following conditions occur, the
153.Fn acl_get_flag_np
154function will return a value of
155\-1
156and set global variable
157.Va errno
158to the corresponding value:
159.Bl -tag -width Er
160.It Bq Er EINVAL
161Argument
162.Fa flag
163does not contain a valid ACL flag or argument
164.Fa flagset_d
165is not a valid ACL flagset.
166.El
167.Sh SEE ALSO
168.Xr acl 3 ,
169.Xr acl_add_flag_np 3 ,
170.Xr acl_clear_flags_np 3 ,
171.Xr acl_delete_flag_np 3 ,
172.Xr acl_get_flagset_np 3 ,
173.Xr acl_set_flagset_np 3 ,
174.Xr posix1e 3
175.Sh STANDARDS
176POSIX.1e is described in IEEE POSIX.1e draft 17.
177.Sh HISTORY
178POSIX.1e support was introduced in
179.Fx 4.0 .
180The
181.Fn acl_get_flag_np
182function was added in
183.Fx 8.0 .
184.Sh AUTHORS
185The
186.Fn acl_get_flag_np
187function was written by
188.An Edward Tomasz Napierala Aq trasz@FreeBSD.org .
189.\"-
190.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala
191.\" All rights reserved.
192.\"
193.\" Redistribution and use in source and binary forms, with or without
194.\" modification, are permitted provided that the following conditions
195.\" are met:
196.\" 1. Redistributions of source code must retain the above copyright
197.\"    notice, this list of conditions and the following disclaimer.
198.\" 2. Redistributions in binary form must reproduce the above copyright
199.\"    notice, this list of conditions and the following disclaimer in the
200.\"    documentation and/or other materials provided with the distribution.
201.\"
202.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
203.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
204.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
205.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE
206.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
207.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
208.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
209.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
210.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
211.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
212.\" POSSIBILITY OF SUCH DAMAGE.
213.\"
214.\" $FreeBSD$
215.\"
216.Dd April 10, 2001
217.Dt ACL_GET_FLAG_NP 3
218.Os
219.Sh NAME
220.Nm acl_get_flag_np
221.Nd check if a flag is set in a flagset
222.Sh LIBRARY
223.Lb libc
224.Sh SYNOPSIS
225.In sys/types.h
226.In sys/acl.h
227.Ft int
228.Fn acl_get_flag_np "acl_flagset_t flagset_d" "acl_flag_t flag"
229.Sh DESCRIPTION
230The
231.Fn acl_get_flag_np
232function
233is a non-portable function that checks if a flag is set in
234a flagset.
235.Sh RETURN VALUES
236If the flag in
237.Fa flag
238is set in the flagset
239.Fa flagset_d ,
240a value of
2411
242is returned, otherwise a value of
2430
244is returned.
245.Sh ERRORS
246If any of the following conditions occur, the
247.Fn acl_get_flag_np
248function will return a value of
249\-1
250and set global variable
251.Va errno
252to the corresponding value:
253.Bl -tag -width Er
254.It Bq Er EINVAL
255Argument
256.Fa flag
257does not contain a valid ACL flag or argument
258.Fa flagset_d
259is not a valid ACL flagset.
260.El
261.Sh SEE ALSO
262.Xr acl 3 ,
263.Xr acl_add_flag_np 3 ,
264.Xr acl_clear_flags_np 3 ,
265.Xr acl_delete_flag_np 3 ,
266.Xr acl_get_flagset_np 3 ,
267.Xr acl_set_flagset_np 3 ,
268.Xr posix1e 3
269.Sh STANDARDS
270POSIX.1e is described in IEEE POSIX.1e draft 17.
271.Sh HISTORY
272POSIX.1e support was introduced in
273.Fx 4.0 .
274The
275.Fn acl_get_flag_np
276function was added in
277.Fx 8.0 .
278.Sh AUTHORS
279The
280.Fn acl_get_flag_np
281function was written by
282.An Edward Tomasz Napierala Aq trasz@FreeBSD.org .
283