summaryrefslogtreecommitdiffstats
path: root/lib/libugidfw/bsde_get_rule.3
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-02-25 03:24:39 +0000
committerrwatson <rwatson@FreeBSD.org>2004-02-25 03:24:39 +0000
commit09eb839cca8c61f73b442ee1015b02aea8ff2ab7 (patch)
treee8eb0fc689bfdff345c063b9dc06cfd2f7ad32d6 /lib/libugidfw/bsde_get_rule.3
parent5ef41f0642b5a50bfde8e227df634fa9b729c49e (diff)
downloadFreeBSD-src-09eb839cca8c61f73b442ee1015b02aea8ff2ab7.zip
FreeBSD-src-09eb839cca8c61f73b442ee1015b02aea8ff2ab7.tar.gz
Add bsde_add_rule(), which is similar to bsde_set_rule() except that
the caller does not specify the rule number -- instead, the kernel module is probed for the next available rule, which is then used. Obtained from: TrustedBSD Project Sponsored by: DARPA, McAfee Research
Diffstat (limited to 'lib/libugidfw/bsde_get_rule.3')
-rw-r--r--lib/libugidfw/bsde_get_rule.331
1 files changed, 29 insertions, 2 deletions
diff --git a/lib/libugidfw/bsde_get_rule.3 b/lib/libugidfw/bsde_get_rule.3
index 1d8ffb1..10bbb7c 100644
--- a/lib/libugidfw/bsde_get_rule.3
+++ b/lib/libugidfw/bsde_get_rule.3
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2003 Networks Associates Technology, Inc.
+.\" Copyright (c) 2003-2004 Networks Associates Technology, Inc.
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by Chris
@@ -30,10 +30,11 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 7, 2003
+.Dd February 24, 2004
.Os
.Dt BSDE_GET_RULE 3
.Sh NAME
+.Nm bsde_add_rule ,
.Nm bsde_get_rule ,
.Nm bsde_set_rule ,
.Nm bsde_delete_rule
@@ -43,6 +44,11 @@
.Sh SYNOPSIS
.In ugidfw.h
.Ft int
+.Fo bsde_add_rule
+.Fa "int *rulenum" "struct mac_bsdextended_rule *rule"
+.Fa "size_t buflen" "char *errstr"
+.Fc
+.Ft int
.Fo bsde_get_rule
.Fa "int rulenum" "struct mac_bsdextended_rule *rule"
.Fa "size_t errlen" "char *errstr"
@@ -56,6 +62,27 @@
.Fn bsde_delete_rule "int rulenum" "size_t errlen" "char *errstr"
.Sh DESCRIPTION
The
+.Fn bsde_add_rule
+function fills the next available
+rule (in
+.Vt "struct mac_bsdextended_rule"
+form, either from
+.Fn bsde_get_rule
+or
+.Xr bsde_parse_rule 3 ) .
+If an error occurs,
+.Fa *errstr
+is filled with the error string
+(up to
+.Fa errlen
+characters, including the terminating
+.Dv NUL ) .
+If successful and
+.Fa rulenum
+is non-NULL, the rule number used will be returned in
+.Fa *rulenum .
+.Pp
+The
.Fn bsde_get_rule
function fills in
.Fa *rule
OpenPOWER on IntegriCloud