xref: /freebsd/lib/libc/posix1e/mac_text.3 (revision 2834b91a8ded96d7acf79f90aca9d758d4f40111)
1d97fcfceSRobert Watson.\" Copyright (c) 2001 Networks Associates Technology, Inc.
2d97fcfceSRobert Watson.\" All rights reserved.
3d97fcfceSRobert Watson.\"
4d97fcfceSRobert Watson.\" This software was developed for the FreeBSD Project by Chris
5d97fcfceSRobert Watson.\" Costello at Safeport Network Services and NAI Labs, the Security
6d97fcfceSRobert Watson.\" Research Division of Network Associates, Inc. under DARPA/SPAWAR
7d97fcfceSRobert Watson.\" contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS
8d97fcfceSRobert Watson.\" research program.
9d97fcfceSRobert Watson.\"
10d97fcfceSRobert Watson.\" Redistribution and use in source and binary forms, with or without
11d97fcfceSRobert Watson.\" modification, are permitted provided that the following conditions
12d97fcfceSRobert Watson.\" are met:
13d97fcfceSRobert Watson.\" 1. Redistributions of source code must retain the above copyright
14d97fcfceSRobert Watson.\"    notice, this list of conditions and the following disclaimer.
15d97fcfceSRobert Watson.\" 2. Redistributions in binary form must reproduce the above copyright
16d97fcfceSRobert Watson.\"    notice, this list of conditions and the following disclaimer in the
17d97fcfceSRobert Watson.\"    documentation and/or other materials provided with the distribution.
18d97fcfceSRobert Watson.\" 3. The name of the author may not be used to endorse or promote
19d97fcfceSRobert Watson.\"    products derived from this software without specific prior written
20d97fcfceSRobert Watson.\"    permission.
21d97fcfceSRobert Watson.\"
22d97fcfceSRobert Watson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
23d97fcfceSRobert Watson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24d97fcfceSRobert Watson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25d97fcfceSRobert Watson.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
26d97fcfceSRobert Watson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27d97fcfceSRobert Watson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28d97fcfceSRobert Watson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29d97fcfceSRobert Watson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30d97fcfceSRobert Watson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31d97fcfceSRobert Watson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32d97fcfceSRobert Watson.\" SUCH DAMAGE.
33d97fcfceSRobert Watson.\"
34d97fcfceSRobert Watson.\" $FreeBSD$
35d97fcfceSRobert Watson.Dd December 21, 2001
36d97fcfceSRobert Watson.Dt MAC_TEXT 3
37d97fcfceSRobert Watson.Sh NAME
38d97fcfceSRobert Watson.Nm mac_from_text ,
39d97fcfceSRobert Watson.Nm mac_to_text
40d97fcfceSRobert Watson.Nd convert MAC label to/from text representation
41d97fcfceSRobert Watson.Sh LIBRARY
42d97fcfceSRobert Watson.Lb libc
43d97fcfceSRobert Watson.Sh SYNOPSIS
44d97fcfceSRobert Watson.In sys/mac.h
45baae0d76SChris Costello.Ft int
46baae0d76SChris Costello.Fn mac_from_text "mac_t *mac" "const char *text"
47baae0d76SChris Costello.Ft int
48baae0d76SChris Costello.Fn mac_to_text "mac_t label" "char **text"
49d97fcfceSRobert Watson.Sh DESCRIPTION
50d97fcfceSRobert WatsonThe
51d97fcfceSRobert Watson.Fn mac_from_text
52d97fcfceSRobert Watsonfunction converts the text representation of a label
53baae0d76SChris Costellointo the internal policy label format
54baae0d76SChris Costello.Vt ( mac_t )
55baae0d76SChris Costelloand places it in
56baae0d76SChris Costello.Fa *mac ,
57d97fcfceSRobert Watsonwhich must later be freed with
58baae0d76SChris Costello.Xr mac_free 3 .
59baae0d76SChris Costello.Pp
60d97fcfceSRobert WatsonThe
61d97fcfceSRobert Watson.Fn mac_to_text
62baae0d76SChris Costellofunction allocates storage for
63baae0d76SChris Costello.Fa *text ,
64baae0d76SChris Costellowhich will be set to the text representation of
65baae0d76SChris Costello.Fa label .
66d97fcfceSRobert Watson.Pp
67311e4324SChris CostelloRefer to
68311e4324SChris Costello.Xr maclabel 7
69311e4324SChris Costellofor the MAC label format.
70d97fcfceSRobert Watson.Sh RETURN VALUES
71baae0d76SChris Costello.Rv -std mac_from_text mac_to_text
72d97fcfceSRobert Watson.Sh COMPATIBILITY
73d97fcfceSRobert WatsonPOSIX.1e does not define
742834b91aSChris Costelloa format for text representations
75d97fcfceSRobert Watsonof MAC labels.
76d97fcfceSRobert Watson.Sh ERRORS
77d97fcfceSRobert Watson.Bl -tag -width Er
78d97fcfceSRobert Watson.It Bq Er ENOMEM
79d97fcfceSRobert WatsonInsufficient memory was available
80d97fcfceSRobert Watsonto allocate internal storage.
81d97fcfceSRobert Watson.El
82d97fcfceSRobert Watson.Sh SEE ALSO
83d97fcfceSRobert Watson.Xr mac 3 ,
84d97fcfceSRobert Watson.Xr mac_free 3 ,
85d97fcfceSRobert Watson.Xr mac_get 3 ,
86311e4324SChris Costello.Xr mac_set 3 ,
87311e4324SChris Costello.Xr maclabel 7
88d97fcfceSRobert Watson.Sh STANDARDS
89d97fcfceSRobert WatsonPOSIX.1e is described in IEEE POSIX.1e draft 17.
90d97fcfceSRobert WatsonDiscussion of the draft
91d97fcfceSRobert Watsoncontinues on the cross-platform POSIX.1e implementation mailing list.
92d97fcfceSRobert WatsonTo join this list, see the
93d97fcfceSRobert Watson.Fx
94d97fcfceSRobert WatsonPOSIX.1e implementation page
95d97fcfceSRobert Watsonfor more information.
96