1d69f8207SChris Costello.\" Copyright (c) 2003 Networks Associates Technology, Inc. 2d69f8207SChris Costello.\" All rights reserved. 3d69f8207SChris Costello.\" 4d69f8207SChris Costello.\" This software was developed for the FreeBSD Project by Chris 5d69f8207SChris Costello.\" Costello at Safeport Network Services and Network Associates 6d69f8207SChris Costello.\" Laboratories, the Security Research Division of Network Associates, 7d69f8207SChris Costello.\" Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part 8d69f8207SChris Costello.\" of the DARPA CHATS research program. 9d69f8207SChris Costello.\" 10d69f8207SChris Costello.\" Redistribution and use in source and binary forms, with or without 11d69f8207SChris Costello.\" modification, are permitted provided that the following conditions 12d69f8207SChris Costello.\" are met: 13d69f8207SChris Costello.\" 1. Redistributions of source code must retain the above copyright 14d69f8207SChris Costello.\" notice, this list of conditions and the following disclaimer. 15d69f8207SChris Costello.\" 2. Redistributions in binary form must reproduce the above copyright 16d69f8207SChris Costello.\" notice, this list of conditions and the following disclaimer in the 17d69f8207SChris Costello.\" documentation and/or other materials provided with the distribution. 18d69f8207SChris Costello.\" 19d69f8207SChris Costello.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20d69f8207SChris Costello.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21d69f8207SChris Costello.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22d69f8207SChris Costello.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23d69f8207SChris Costello.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24d69f8207SChris Costello.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25d69f8207SChris Costello.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26d69f8207SChris Costello.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27d69f8207SChris Costello.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28d69f8207SChris Costello.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29d69f8207SChris Costello.\" SUCH DAMAGE. 30d69f8207SChris Costello.\" 31862b46f6SRuslan Ermilov.Dd February 25, 2004 32d69f8207SChris Costello.Dt LIBUGIDFW 3 33*aa12cea2SUlrich Spörlein.Os 34d69f8207SChris Costello.Sh NAME 35d69f8207SChris Costello.Nm libugidfw 369be02550SRuslan Ermilov.Nd "library interface to the file system firewall MAC policy" 37d69f8207SChris Costello.Sh LIBRARY 38d69f8207SChris Costello.Lb libugidfw 39d69f8207SChris Costello.Sh SYNOPSIS 4089afecd4SRobert Watson.In sys/types.h 4189afecd4SRobert Watson.In security/mac_bsdextended/mac_bsdextended.h 42d69f8207SChris Costello.In ugidfw.h 43d69f8207SChris Costello.Sh DESCRIPTION 44d69f8207SChris CostelloThe 45d69f8207SChris Costello.Nm 46d69f8207SChris Costellolibrary routines provide an interface to the 47d69f8207SChris Costello.Xr mac_bsdextended 4 48d69f8207SChris Costellofile system firewall MAC policy. 49d69f8207SChris Costello.Pp 50d69f8207SChris CostelloThe 51d69f8207SChris Costello.Nm 52d69f8207SChris Costellolibrary defines the following functions: 539be02550SRuslan Ermilov.Bl -tag -width ".Fn bsde_parse_rule_string" 54d69f8207SChris Costello.It Fn bsde_rule_to_string 55d69f8207SChris CostelloConverts the internal representation of a rule 569be02550SRuslan Ermilov.Pq Vt "struct mac_bsdextended_rule" 57d69f8207SChris Costellointo its text representation; 58d69f8207SChris Costellosee 59d69f8207SChris Costello.Xr bsde_rule_to_string 3 . 60d69f8207SChris Costello.It Fn bsde_parse_rule 61d69f8207SChris CostelloParses an entire rule 62d69f8207SChris Costello(in argument array form); 63d69f8207SChris Costellosee 64d69f8207SChris Costello.Xr bsde_parse_rule 3 . 65d69f8207SChris Costello.It Fn bsde_parse_rule_string 666e238d76SChris CostelloParses an entire rule string; 67d69f8207SChris Costellosee 68d69f8207SChris Costello.Xr bsde_parse_rule_string 3 . 69d69f8207SChris Costello.It Fn bsde_get_rule_count 70d69f8207SChris CostelloReturns the total number of ugidfw rules being enforced in the system; 71d69f8207SChris Costellosee 72d69f8207SChris Costello.Xr bsde_get_rule_count 3 . 73d69f8207SChris Costello.It Fn bsde_get_rule_slots 74d69f8207SChris CostelloReturns the total number of used rule slots; 75d69f8207SChris Costellosee 76d69f8207SChris Costello.Xr bsde_get_rule_slots 3 . 77d69f8207SChris Costello.It Fn bsde_get_rule 78d69f8207SChris CostelloReturns a rule by its rule number; 79d69f8207SChris Costellosee 80d69f8207SChris Costello.Xr bsde_get_rule 3 . 81d69f8207SChris Costello.It Fn bsde_delete_rule 82d69f8207SChris CostelloDeletes a rule by its rule number; 83d69f8207SChris Costellosee 84d69f8207SChris Costello.Xr bsde_delete_rule 3 . 85d69f8207SChris Costello.It Fn bsde_set_rule 86d69f8207SChris CostelloUploads the rule to the 87d69f8207SChris Costello.Xr mac_bsdextended 4 88d69f8207SChris Costellomodule and applies it; 89d69f8207SChris Costellosee 90d69f8207SChris Costello.Xr bsde_set_rule 3 . 9147ab23aaSRobert Watson.It Fn bsde_add_rule 9247ab23aaSRobert WatsonUpload the rule to the module, automatically selecting the next available 9347ab23aaSRobert Watsonrule number; see 9447ab23aaSRobert Watson.Xr bsde_add_rule 3 . 95d69f8207SChris Costello.El 96d69f8207SChris Costello.Sh SEE ALSO 97d69f8207SChris Costello.Xr bsde_delete_rule 3 , 98d69f8207SChris Costello.Xr bsde_get_rule 3 , 99d69f8207SChris Costello.Xr bsde_get_rule_count 3 , 100d69f8207SChris Costello.Xr bsde_get_rule_slots 3 , 101d69f8207SChris Costello.Xr bsde_parse_rule 3 , 102d69f8207SChris Costello.Xr bsde_parse_rule_string 3 , 103d69f8207SChris Costello.Xr bsde_rule_to_string 3 , 104d69f8207SChris Costello.Xr bsde_set_rule 3 105d69f8207SChris Costello.Sh AUTHORS 106d69f8207SChris CostelloThis software was contributed to the 107d69f8207SChris Costello.Fx 108d69f8207SChris CostelloProject by Network Associates Labs, 109d69f8207SChris Costellothe Security Research Division of Network Associates 1101a0a9345SRuslan ErmilovInc. 1111a0a9345SRuslan Ermilovunder DARPA/SPAWAR contract N66001-01-C-8035 1129be02550SRuslan Ermilov.Pq Dq CBOSS , 113d69f8207SChris Costelloas part of the DARPA CHATS research program. 114