xref: /freebsd/lib/libc/posix1e/acl_extended_file_np.3 (revision e6bfd18d21b225af6a0ed67ceeaf1293b7b9eba5)
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.Sh SEE ALSO
79.Xr extattr_get_file 2 ,
80.Xr posix1e 3
81.Sh STANDARDS
82POSIX.1e is described in IEEE POSIX.1e draft 17.
83Discussion
84of the draft continues on the cross-platform POSIX.1e implementation
85mailing list.
86To join this list, see the
87.Fx
88POSIX.1e implementation
89page for more information.
90.Sh HISTORY
91POSIX.1e support was introduced in
92.Fx 4.0 ,
93and development continues.
94.Sh AUTHORS
95.An Gleb Popov
96