xref: /netbsd-src/lib/libc/posix1e/acl_get_flag_np.3 (revision 1b3734281f17fd86d3db0e29f84ea9985be6fe06)
1.\" $NetBSD: acl_get_flag_np.3,v 1.2 2020/06/18 19:46:34 wiz Exp $
2.\"-
3.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" $FreeBSD: head/lib/libc/posix1e/acl_get_flag_np.3 273853 2014-10-30 10:49:50Z trasz $
28.\"
29.Dd October 30, 2014
30.Dt ACL_GET_FLAG_NP 3
31.Os
32.Sh NAME
33.Nm acl_get_flag_np
34.Nd check if a flag is set in a flagset
35.Sh LIBRARY
36.Lb libc
37.Sh SYNOPSIS
38.In sys/types.h
39.In sys/acl.h
40.Ft int
41.Fn acl_get_flag_np "acl_flagset_t flagset_d" "acl_flag_t flag"
42.Sh DESCRIPTION
43The
44.Fn acl_get_flag_np
45function
46is a non-portable function that checks if a NFSv4 ACL flag is set in
47a flagset.
48.Sh RETURN VALUES
49If the flag in
50.Fa flag
51is set in the flagset
52.Fa flagset_d ,
53a value of
541
55is returned, otherwise a value of
560
57is returned.
58.Sh ERRORS
59If any of the following conditions occur, the
60.Fn acl_get_flag_np
61function will return a value of
62\-1
63and set global variable
64.Va errno
65to the corresponding value:
66.Bl -tag -width Er
67.It Bq Er EINVAL
68Argument
69.Fa flag
70does not contain a valid ACL flag or argument
71.Fa flagset_d
72is not a valid ACL flagset.
73.El
74.Sh SEE ALSO
75.Xr acl 3 ,
76.Xr acl_add_flag_np 3 ,
77.Xr acl_clear_flags_np 3 ,
78.Xr acl_delete_flag_np 3 ,
79.Xr acl_get_flagset_np 3 ,
80.Xr acl_set_flagset_np 3 ,
81.Xr posix1e 3
82.Sh STANDARDS
83POSIX.1e is described in IEEE POSIX.1e draft 17.
84.Sh HISTORY
85POSIX.1e support was introduced in
86.Fx 4.0 .
87The
88.Fn acl_get_flag_np
89function was added in
90.Fx 8.0 .
91.Sh AUTHORS
92The
93.Fn acl_get_flag_np
94function was written by
95.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org .
96