ugidfw.h revision 126217
1101206Srwatson/*- 2126217Srwatson * Copyright (c) 2002, 2004 Networks Associates Technology, Inc. 3101206Srwatson * All rights reserved. 4101206Srwatson * 5106573Srwatson * This software was developed for the FreeBSD Project by Network Associates 6106573Srwatson * Laboratories, the Security Research Division of Network Associates, Inc. 7106573Srwatson * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the 8106573Srwatson * DARPA CHATS research program. 9101206Srwatson * 10101206Srwatson * Redistribution and use in source and binary forms, with or without 11101206Srwatson * modification, are permitted provided that the following conditions 12101206Srwatson * are met: 13101206Srwatson * 1. Redistributions of source code must retain the above copyright 14101206Srwatson * notice, this list of conditions and the following disclaimer. 15101206Srwatson * 2. Redistributions in binary form must reproduce the above copyright 16101206Srwatson * notice, this list of conditions and the following disclaimer in the 17101206Srwatson * documentation and/or other materials provided with the distribution. 18101206Srwatson * 19101206Srwatson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 20101206Srwatson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21101206Srwatson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22101206Srwatson * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 23101206Srwatson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24101206Srwatson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25101206Srwatson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26101206Srwatson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27101206Srwatson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28101206Srwatson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29101206Srwatson * SUCH DAMAGE. 30101206Srwatson * 31101206Srwatson * $FreeBSD: head/lib/libugidfw/ugidfw.h 126217 2004-02-25 03:24:39Z rwatson $ 32101206Srwatson */ 33101206Srwatson 34101206Srwatson#ifndef _UGIDFW_H 35101206Srwatson#define _UGIDFW_H 36101206Srwatson 37101206Srwatson__BEGIN_DECLS 38101206Srwatsonint bsde_rule_to_string(struct mac_bsdextended_rule *rule, char *buf, 39101206Srwatson size_t buflen); 40101206Srwatsonint bsde_parse_identity(int argc, char *argv[], 41101206Srwatson struct mac_bsdextended_identity *identity, size_t buflen, 42101206Srwatson char *errstr); 43101206Srwatsonint bsde_parse_mode(int argc, char *argv[], mode_t *mode, size_t buflen, 44101206Srwatson char *errstr); 45101206Srwatsonint bsde_parse_rule(int argc, char *argv[], 46101206Srwatson struct mac_bsdextended_rule *rule, size_t buflen, char *errstr); 47101206Srwatsonint bsde_parse_rule_string(const char *string, 48101206Srwatson struct mac_bsdextended_rule *rule, size_t buflen, char *errstr); 49104038Srwatsonint bsde_get_mib(const char *string, int *name, size_t *namelen); 50101206Srwatsonint bsde_get_rule_count(size_t buflen, char *errstr); 51101206Srwatsonint bsde_get_rule_slots(size_t buflen, char *errstr); 52101206Srwatsonint bsde_get_rule(int rulenum, struct mac_bsdextended_rule *rule, 53101206Srwatson size_t errlen, char *errstr); 54101206Srwatsonint bsde_delete_rule(int rulenum, size_t buflen, char *errstr); 55101206Srwatsonint bsde_set_rule(int rulenum, struct mac_bsdextended_rule *rule, 56101206Srwatson size_t buflen, char *errstr); 57126217Srwatsonint bsde_add_rule(int *rulename, struct mac_bsdextended_rule *rule, 58126217Srwatson size_t buflen, char *errstr); 59101206Srwatson__END_DECLS 60101206Srwatson 61101206Srwatson#endif 62