xref: /netbsd-src/lib/libc/posix1e/acl_get_brand_np.3 (revision 1b3734281f17fd86d3db0e29f84ea9985be6fe06)
1.\" $NetBSD: acl_get_brand_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_brand_np.3 267774 2014-06-23 08:25:03Z bapt $
28.\"
29.Dd June 25, 2009
30.Dt ACL_GET_BRAND_NP 3
31.Os
32.Sh NAME
33.Nm acl_get_brand_np
34.Nd retrieve the ACL brand from an ACL entry
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_brand_np "acl_t acl" "int *brand_p"
42.Sh DESCRIPTION
43The
44.Fn acl_get_brand_np
45function
46is a non-portable call that returns the ACL brand for the ACL
47.Fa acl .
48Upon successful completion, the location referred to by the argument
49.Fa brand_p
50will be set to the ACL brand of the ACL
51.Fa acl .
52.Pp
53Branding is an internal mechanism intended to prevent mixing POSIX.1e
54and NFSv4 entries by mistake.
55It's also used by the libc to determine how to print out the ACL.
56The first call to function that is specific for one particular brand - POSIX.1e
57or NFSv4 - "brands" the ACL.
58After that, calling function specific to another brand will result in error.
59.Sh RETURN VALUES
60.Rv -std acl_get_brand_np
61.Sh ERRORS
62The
63.Fn acl_get_brand_np
64function fails if:
65.Bl -tag -width Er
66.It Bq Er EINVAL
67Argument
68.Fa acl
69does not point to a valid ACL.
70.El
71.Sh SEE ALSO
72.Xr acl 3 ,
73.Xr posix1e 3
74.Sh STANDARDS
75POSIX.1e is described in IEEE POSIX.1e draft 17.
76.Sh HISTORY
77POSIX.1e support was introduced in
78.Fx 4.0 .
79The
80.Fn acl_get_brand_np
81function was added in
82.Fx 8.0 .
83.Sh AUTHORS
84The
85.Fn acl_get_brand_np
86function was written by
87.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org .
88