xref: /freebsd/lib/libugidfw/bsde_rule_to_string.3 (revision cddbc3b40812213ff00041f79174cac0be360a2a)
1.\" Copyright (c) 2003 Networks Associates Technology, Inc.
2.\" All rights reserved.
3.\"
4.\" This software was developed for the FreeBSD Project by Chris
5.\" Costello at Safeport Network Services and Network Associates
6.\" Laboratories, the Security Research Division of Network Associates,
7.\" Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part
8.\" of the DARPA CHATS research program.
9.\"
10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions
12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright
14.\"    notice, this list of conditions and the following disclaimer.
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\"    notice, this list of conditions and the following disclaimer in the
17.\"    documentation and/or other materials provided with the distribution.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.\" $FreeBSD$
32.\"
33.Dd January 7, 2003
34.Dt BSDE_RULE_TO_STRING 3
35.Os
36.Sh NAME
37.Nm bsde_rule_to_string
38.Nd "convert a ugidfw rule into its text representation"
39.Sh LIBRARY
40.Lb libugidfw
41.Sh SYNOPSIS
42.In ugidfw.h
43.Ft int
44.Fo bsde_rule_to_string
45.Fa "struct mac_bsdextended_rule *rule" "char *buf" "size_t buflen"
46.Fc
47.Sh DESCRIPTION
48The
49.Fn bsde_rule_to_string
50function converts a rule in its internal representation
51.Pq Vt "struct mac_bsdextended_rule"
52into its text representation, and writes up to
53.Fa buflen
54bytes of it to
55.Fa buf
56(including the terminating
57.Dv NUL ) .
58.Sh RETURN VALUES
59The
60.Fn bsde_rule_to_string
61function returns \-1 if the conversion was truncated;
62otherwise the value 0 is returned.
63.Sh SEE ALSO
64.Xr bsde_delete_rule 3 ,
65.Xr bsde_get_rule 3 ,
66.Xr bsde_get_rule_count 3 ,
67.Xr bsde_get_rule_slots 3 ,
68.Xr bsde_parse_rule 3 ,
69.Xr bsde_parse_rule_string 3 ,
70.Xr bsde_set_rule 3 ,
71.Xr libugidfw 3 ,
72.Xr mac_bsdextended 4 ,
73.Xr ugidfw 8
74.Sh AUTHORS
75This software was contributed to the
76.Fx
77Project by Network Associates Labs,
78the Security Research Division of Network Associates
79Inc.
80under DARPA/SPAWAR contract N66001-01-C-8035
81.Pq Dq CBOSS ,
82as part of the DARPA CHATS research program.
83