xref: /freebsd/lib/libc/posix1e/mac.conf.5 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1781a15a5SRobert Watson.\" Copyright (c) 2003 Networks Associates Technology, Inc.
2781a15a5SRobert Watson.\" All rights reserved.
3781a15a5SRobert Watson.\"
4781a15a5SRobert Watson.\" This software was developed for the FreeBSD Project in part by Network
5781a15a5SRobert Watson.\" Associates Laboratories, the Security Research Division of Network
6781a15a5SRobert Watson.\" Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"),
7781a15a5SRobert Watson.\" as part of the DARPA CHATS research program.
8781a15a5SRobert Watson.\"
9781a15a5SRobert Watson.\" Redistribution and use in source and binary forms, with or without
10781a15a5SRobert Watson.\" modification, are permitted provided that the following conditions
11781a15a5SRobert Watson.\" are met:
12781a15a5SRobert Watson.\" 1. Redistributions of source code must retain the above copyright
13781a15a5SRobert Watson.\"    notice, this list of conditions and the following disclaimer.
14781a15a5SRobert Watson.\" 2. Redistributions in binary form must reproduce the above copyright
15781a15a5SRobert Watson.\"    notice, this list of conditions and the following disclaimer in the
16781a15a5SRobert Watson.\"    documentation and/or other materials provided with the distribution.
17781a15a5SRobert Watson.\"
18781a15a5SRobert Watson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
19781a15a5SRobert Watson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20781a15a5SRobert Watson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21781a15a5SRobert Watson.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
22781a15a5SRobert Watson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23781a15a5SRobert Watson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24781a15a5SRobert Watson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25781a15a5SRobert Watson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26781a15a5SRobert Watson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27781a15a5SRobert Watson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28781a15a5SRobert Watson.\" SUCH DAMAGE.
29781a15a5SRobert Watson.\"
30*208a8b95SEdward Tomasz Napierala.Dd July 25, 2015
31781a15a5SRobert Watson.Dt MAC.CONF 5
32781a15a5SRobert Watson.Os
33781a15a5SRobert Watson.Sh NAME
34781a15a5SRobert Watson.Nm mac.conf
35734ac3b5SRuslan Ermilov.Nd format of the MAC library configuration file
36781a15a5SRobert Watson.Sh DESCRIPTION
37781a15a5SRobert WatsonThe
38781a15a5SRobert Watson.Nm
39781a15a5SRobert Watsonfile configures the default label elements to be used by policy-agnostic
40781a15a5SRobert Watsonapplications that operate on MAC labels.
41734ac3b5SRuslan ErmilovA file contains a series of default label sets specified by object class,
42781a15a5SRobert Watsonin addition to blank lines and comments preceded by a
43734ac3b5SRuslan Ermilov.Ql #
44781a15a5SRobert Watsonsymbol.
45781a15a5SRobert Watson.Pp
46ca8d7823SChristian S.J. PeronCurrently, the implementation supports two syntax styles for label
472d82ac31SRuslan Ermilovelement declaration.
482d82ac31SRuslan ErmilovThe old (deprecated) syntax consists of a
49ca8d7823SChristian S.J. Peronsingle line with two fields separated by white space: the object
50ca8d7823SChristian S.J. Peronclass name, and a list of label elements as used by the
51781a15a5SRobert Watson.Xr mac_prepare 3
52781a15a5SRobert Watsonlibrary calls prior to an application invocation of a function from
53781a15a5SRobert Watson.Xr mac_get 3 .
54ca8d7823SChristian S.J. Peron.Pp
55ca8d7823SChristian S.J. PeronThe newer more preferred syntax consists of three fields separated by
56ca8d7823SChristian S.J. Peronwhite space: the label group, object class name and a list of
57ca8d7823SChristian S.J. Peronlabel elements.
58ca8d7823SChristian S.J. Peron.Pp
59781a15a5SRobert WatsonLabel element names may optionally begin with a
60734ac3b5SRuslan Ermilov.Ql \&?
61781a15a5SRobert Watsonsymbol to indicate that a failure to retrieve the label element for
62781a15a5SRobert Watsonan object should be silently ignored, and improves usability if the
63781a15a5SRobert Watsonset of MAC policies may change over time.
6424a0682cSRuslan Ermilov.Sh FILES
6524a0682cSRuslan Ermilov.Bl -tag -width ".Pa /etc/mac.conf" -compact
6624a0682cSRuslan Ermilov.It Pa /etc/mac.conf
6724a0682cSRuslan ErmilovMAC library configuration file.
6824a0682cSRuslan Ermilov.El
69781a15a5SRobert Watson.Sh EXAMPLES
70781a15a5SRobert WatsonThe following example configures user applications to operate with
71781a15a5SRobert Watsonfour MAC policies:
72781a15a5SRobert Watson.Xr mac_biba 4 ,
73781a15a5SRobert Watson.Xr mac_mls 4 ,
74781a15a5SRobert WatsonSEBSD,
75781a15a5SRobert Watsonand
76781a15a5SRobert Watson.Xr mac_partition 4 .
77781a15a5SRobert Watson.Bd -literal -offset indent
78781a15a5SRobert Watson#
79781a15a5SRobert Watson# Default label set to be used by simple MAC applications
80ca8d7823SChristian S.J. Peron
81ca8d7823SChristian S.J. Perondefault_labels file ?biba,?lomac,?mls,?sebsd
82ca8d7823SChristian S.J. Perondefault_labels ifnet ?biba,?lomac,?mls,?sebsd
83ca8d7823SChristian S.J. Perondefault_labels process ?biba,?lomac,?mls,?partition,?sebsd
84ca8d7823SChristian S.J. Perondefault_labels socket ?biba,?lomac,?mls
85ca8d7823SChristian S.J. Peron
86781a15a5SRobert Watson#
87ca8d7823SChristian S.J. Peron# Deprecated (old) syntax
88781a15a5SRobert Watson
89781a15a5SRobert Watsondefault_file_labels ?biba,?mls,?sebsd
90781a15a5SRobert Watsondefault_ifnet_labels ?biba,?mls,?sebsd
91781a15a5SRobert Watsondefault_process_labels ?biba,?mls,partition,?sebsd
92781a15a5SRobert Watson.Ed
932715ba48SRobert Watson.Pp
94781a15a5SRobert WatsonIn this example, userland applications will attempt to retrieve Biba,
95781a15a5SRobert WatsonMLS, and SEBSD labels for all object classes; for processes, they will
96781a15a5SRobert Watsonadditionally attempt to retrieve a Partition identifier.
97781a15a5SRobert WatsonIn all cases except the Partition identifier, failure to retrieve a
98781a15a5SRobert Watsonlabel due to the respective policy not being present will be ignored.
99781a15a5SRobert Watson.Sh SEE ALSO
100734ac3b5SRuslan Ermilov.Xr mac 3 ,
101781a15a5SRobert Watson.Xr mac_get 3 ,
102781a15a5SRobert Watson.Xr mac_prepare 3 ,
103781a15a5SRobert Watson.Xr mac 4 ,
104781a15a5SRobert Watson.Xr mac 9
105781a15a5SRobert Watson.Sh HISTORY
106781a15a5SRobert WatsonSupport for Mandatory Access Control was introduced in
107781a15a5SRobert Watson.Fx 5.0
108781a15a5SRobert Watsonas part of the
109781a15a5SRobert Watson.Tn TrustedBSD
110781a15a5SRobert WatsonProject.
111