1a5684034SChris Costello.\" Copyright (c) 2003 Networks Associates Technology, Inc. 2a5684034SChris Costello.\" All rights reserved. 3a5684034SChris Costello.\" 4a5684034SChris Costello.\" This software was developed for the FreeBSD Project by Chris Costello 5a5684034SChris Costello.\" at Safeport Network Services and Network Associates Labs, the 6a5684034SChris Costello.\" Security Research Division of Network Associates, Inc. under 7a5684034SChris Costello.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the 8a5684034SChris Costello.\" DARPA CHATS research program. 9a5684034SChris Costello.\" 10a5684034SChris Costello.\" Redistribution and use in source and binary forms, with or without 11a5684034SChris Costello.\" modification, are permitted provided that the following conditions 12a5684034SChris Costello.\" are met: 13a5684034SChris Costello.\" 1. Redistributions of source code must retain the above copyright 14a5684034SChris Costello.\" notice, this list of conditions and the following disclaimer. 15a5684034SChris Costello.\" 2. Redistributions in binary form must reproduce the above copyright 16a5684034SChris Costello.\" notice, this list of conditions and the following disclaimer in the 17a5684034SChris Costello.\" documentation and/or other materials provided with the distribution. 18a5684034SChris Costello.\" 19a5684034SChris Costello.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20a5684034SChris Costello.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21a5684034SChris Costello.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22a5684034SChris Costello.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23a5684034SChris Costello.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24a5684034SChris Costello.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25a5684034SChris Costello.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26a5684034SChris Costello.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27a5684034SChris Costello.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28a5684034SChris Costello.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29a5684034SChris Costello.\" SUCH DAMAGE. 30a5684034SChris Costello.\" 31a5684034SChris Costello.\" $FreeBSD$ 32a5684034SChris Costello.Dd JANUARY 8, 2003 33a5684034SChris Costello.Os 34a5684034SChris Costello.Dt MAC 4 35a5684034SChris Costello.Sh NAME 36a5684034SChris Costello.Nm mac 37a5684034SChris Costello.Nd Mandatory Access Control 38a5684034SChris Costello.Sh SYNOPSIS 39a5684034SChris Costello.Cd "options MAC" 40a5684034SChris Costello.Sh DESCRIPTION 41a5684034SChris Costello.Ss Introduction 42a5684034SChris CostelloThe Mandatory Access Control, or MAC, framework allows administrators to 43a5684034SChris Costellofinely control system security by providing for a loadable security policy 44a5684034SChris Costelloarchitecture. 45a5684034SChris CostelloIt is important to note that due to its nature, MAC security policies may 46a5684034SChris Costelloonly further restrict security; they cannot override traditional UNIX 47a5684034SChris Costellosecurity provisions such as file permissions and superuser checks. 48a5684034SChris Costello.Pp 49a5684034SChris CostelloCurrently, the following MAC policy modules are shipped with 50a5684034SChris Costello.Fx : 51a5684034SChris Costello.Bl -column ".Xr mac_seeotheruids 4" "low-watermark mac policy" ".Em Labeling" "boot only" 52a5684034SChris Costello.It Em Name Ta Em Description Ta Em Labeling Ta Em "Load time" 53a5684034SChris Costello.It Xr mac_biba 4 Ta "Biba integrity policy" Ta yes Ta boot only 54a5684034SChris Costello.It Xr mac_bsdextended 4 Ta "File system firewall" Ta no Ta any time 55a5684034SChris Costello.It Xr mac_ifoff 4 Ta "Interface silencing" Ta no Ta any time 56a5684034SChris Costello.It Xr mac_lomac 4 Ta "Low-Watermark MAC policy" Ta yes Ta boot only 57a5684034SChris Costello.It Xr mac_mls 4 Ta "Confidentiality policy" Ta yes Ta boot only 58a5684034SChris Costello.It Xr mac_none 4 Ta "Sample no-op policy" Ta no Ta any time 59a5684034SChris Costello.It Xr mac_partition 4 Ta "Process partition policy" Ta yes Ta any time 60a5684034SChris Costello.It Xr mac_seeotheruids 4 Ta "See-other-UIDs policy" Ta no Ta any time 61a5684034SChris Costello.It Xr mac_test 4 Ta "MAC testing policy" Ta no Ta any time 62a5684034SChris Costello.El 63a5684034SChris Costello.Ss MAC Labels 64a5684034SChris CostelloEach system subject (processes, sockets, etc.) and each system object 65a5684034SChris Costello(file system objects, sockets, etc.) can carry with it a MAC label. 66a5684034SChris CostelloMAC labels can contain data in an arbitrary format 67a5684034SChris Costelloused by the MAC policies in order to help determine how to determine 68a5684034SChris Costelloaccess rights for a given operation. 69a5684034SChris CostelloMost MAC labels on system subjects and objects 70a5684034SChris Costellocan be modified directly or indirectly by the system 71a5684034SChris Costelloadministrator. 72a5684034SChris CostelloMore information on the format for MAC labels can be found in the 73a5684034SChris Costello.Xr maclabel 7 74a5684034SChris Costelloman page. 75a5684034SChris Costello.Ss Setting MAC labels 76a5684034SChris CostelloFrom the command line, each type of system object has its own way of setting 77a5684034SChris Costelloand modifying its MAC policy label. 78a5684034SChris Costello.Bl -column "user login process" "Xr login.conf 5" -offset indent 79a5684034SChris Costello.It Em "Subject/Object" Ta Em "Utility" 80a5684034SChris Costello.It "File system object" Ta Xr setfmac 8 81a5684034SChris Costello.It "Network interface" Ta Xr ifconfig 8 82a5684034SChris Costello.It "TTY (by login class)" Ta Xr login.conf 5 83a5684034SChris Costello.It "User (by login class)" Ta Xr login.conf 5 84a5684034SChris Costello.El 85a5684034SChris Costello.Pp 86a5684034SChris CostelloAdditionally, the 87a5684034SChris Costello.Xr setpmac 8 88a5684034SChris Costellocommand can be used to run a command with a different process label than 89a5684034SChris Costellothe shell's current label. 90a5684034SChris Costello.Ss Programming With MAC 91a5684034SChris CostelloMAC security enforcement itself is transparent to application 92a5684034SChris Costelloprograms, with the exception that some programs may need to be aware of 93a5684034SChris Costelloadditional 94a5684034SChris Costello.Xr errno 2 95a5684034SChris Costelloreturns from various system calls. 96a5684034SChris Costello.Pp 97a5684034SChris CostelloThe interface for retrieving, handling, and setting policy labels 98a5684034SChris Costellois documented in the 99a5684034SChris Costello.Xr mac 3 100a5684034SChris Costelloman page. 101a5684034SChris Costello.Sh SEE ALSO 102a5684034SChris Costello.Xr mac 3 , 103a5684034SChris Costello.Xr mac_biba 4 , 104a5684034SChris Costello.Xr mac_bsdextended 4 , 105a5684034SChris Costello.Xr mac_ifoff 4 , 106a5684034SChris Costello.Xr mac_lomac 4 , 107a5684034SChris Costello.Xr mac_mls 4 , 108a5684034SChris Costello.Xr mac_none 4 , 109a5684034SChris Costello.Xr mac_partition 4 , 110a5684034SChris Costello.Xr mac_seeotheruids 4 , 111a5684034SChris Costello.Xr mac_test 4 , 112a5684034SChris Costello.Xr login.5 , 113a5684034SChris Costello.Xr maclabel 7 , 114a5684034SChris Costello.Xr getfmac 8 , 115a5684034SChris Costello.Xr setfmac 8 , 116a5684034SChris Costello.Xr getpmac 8 , 117a5684034SChris Costello.Xr setpmac 8 , 118a5684034SChris Costello.Xr mac 9 119a5684034SChris Costello.Sh HISTORY 120a5684034SChris CostelloThe 121a5684034SChris Costello.Nm 122a5684034SChris Costelloimplementation first appeared in 123a5684034SChris Costello.Fx 5.0 124a5684034SChris Costelloand was developed by the TrustedBSD Project. 125a5684034SChris Costello.Sh AUTHORS 126a5684034SChris CostelloThis software was contributed to the 127a5684034SChris Costello.Fx 128a5684034SChris CostelloProject by Network Associates Labs, 129a5684034SChris Costellothe Security Research Division of Network Associates 130a5684034SChris CostelloInc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), 131a5684034SChris Costelloas part of the DARPA CHATS research program. 132