xref: /freebsd/lib/libc/posix1e/acl_extended_file_np.3 (revision 87b759f0fa1f7554d50ce640c40138512bbded44)
1.\"-
2.\" Copyright (c) 2021 Gleb Popov
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 CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.Dd February 26, 2021
27.Dt ACL_EXTENDED_FILE_NP 3
28.Os
29.Sh NAME
30.Nm acl_extended_file_np ,
31.Nm acl_extended_file_nofollow_np ,
32.Nm acl_extended_link_np
33.Nd checks if the file has extended ACLs set
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_extended_file_np "const char* path_p"
41.Ft int
42.Fn acl_extended_file_nofollow_np "const char* path_p"
43.Ft int
44.Fn acl_extended_link_np "const char* path_p"
45.Sh DESCRIPTION
46The
47.Fn acl_extended_file_np
48function is a non-portable call that checks if the file or directory referred to
49by the argument
50.Va path_p
51contains extended access ACLs. The
52.Fn acl_extended_file_nofollow_np
53function works the same way, except it does not follow symlinks. The
54.Fn acl_extended_link_np
55function is a synonim to
56.Fn acl_extended_file_nofollow_np
57named in FreeBSD style.
58An ACL is considered to be extended access one if it contains entries other
59than the three required entries of tag types ACL_USER_OBJ, ACL_GROUP_OBJ and
60ACL_OTHER.
61.Sh RETURN VALUES
62Upon successful completion, this function returns 0 if the file object does not
63contain extended access ACLs and 1 in the other case.
64Otherwise, the value -1 is returned, and
65.Va errno
66indicates the error.
67.Sh ERRORS
68If any of the following conditions occur, the
69.Fn acl_extended_file_np
70function shall return a value of
71.Va -1
72and set
73.Va errno
74to the corresponding value:
75.Bl -tag -width Er
76.It Bq Er EACCES
77Search permission is denied for a component of the path prefix.
78.El
79.Sh SEE ALSO
80.Xr extattr_get_file 2 ,
81.Xr posix1e 3
82.Sh STANDARDS
83POSIX.1e is described in IEEE POSIX.1e draft 17.
84Discussion
85of the draft continues on the cross-platform POSIX.1e implementation
86mailing list.
87To join this list, see the
88.Fx
89POSIX.1e implementation
90page for more information.
91.Sh HISTORY
92POSIX.1e support was introduced in
93.Fx 4.0 ,
94and development continues.
95.Sh AUTHORS
96.An Gleb Popov
97