summaryrefslogtreecommitdiffstats
path: root/contrib/openbsm/bsm/libbsm.h
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-04-16 15:37:10 +0000
committerrwatson <rwatson@FreeBSD.org>2007-04-16 15:37:10 +0000
commit9d9ec51b2c47983a8f8c8d48ed2fca487c2b272a (patch)
tree103f2ad3fab79dfe5e3b4ca02ebf1d9c1e2e4e82 /contrib/openbsm/bsm/libbsm.h
parent6b46b736cc84f6697b21608e304026e847ac155d (diff)
downloadFreeBSD-src-9d9ec51b2c47983a8f8c8d48ed2fca487c2b272a.zip
FreeBSD-src-9d9ec51b2c47983a8f8c8d48ed2fca487c2b272a.tar.gz
Vendor import TrustedBSD OpenBSM 1.0 alpha 14, with the following change
history notes since the last import: OpenBSM 1.0 alpha 14 - Fix endian issues when processing IPv6 addresses for extended subject and process tokens. - gcc41 warnings clean. - Teach audit_submit(3) about getaudit_addr(2). - Add support for zonename tokens. OpenBSM 1.0 alpha 13 - compat/clock_gettime.h now provides a compatibility implementation of clock_gettime(), which fixes building on Mac OS X. - Countless man page improvements, markup fixes, content fixs, etc. - XML printing support via "praudit -x". - audit.log.5 expanded to include additional BSM token types. - Added encoding and decoding routines for process64_ex, process32_ex, subject32_ex, header64, and attr64 tokens. - Additional audit event identifiers for listen, mlockall/munlockall, getpath, POSIX message queues, and mandatory access control. Approved by: re (bmah) MFC after: 3 weeks Obtained from: TrustedBSD Project
Diffstat (limited to 'contrib/openbsm/bsm/libbsm.h')
-rw-r--r--contrib/openbsm/bsm/libbsm.h54
1 files changed, 51 insertions, 3 deletions
diff --git a/contrib/openbsm/bsm/libbsm.h b/contrib/openbsm/bsm/libbsm.h
index 2d76c39..b1a9731 100644
--- a/contrib/openbsm/bsm/libbsm.h
+++ b/contrib/openbsm/bsm/libbsm.h
@@ -26,7 +26,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#30 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#33 $
*/
#ifndef _LIBBSM_H_
@@ -164,6 +164,12 @@ typedef struct au_tidaddr32 {
u_int32_t addr[4];
} au_tidaddr32_t;
+typedef struct au_tidaddr64 {
+ u_int64_t port;
+ u_int32_t type;
+ u_int32_t addr[4];
+} au_tidaddr64_t;
+
/*
* argument # 1 byte
* argument value 4 bytes/8 bytes (32-bit/64-bit value)
@@ -483,6 +489,17 @@ typedef struct {
au_tidaddr32_t tid;
} au_proc32ex_t;
+typedef struct {
+ u_int32_t auid;
+ u_int32_t euid;
+ u_int32_t egid;
+ u_int32_t ruid;
+ u_int32_t rgid;
+ u_int32_t pid;
+ u_int32_t sid;
+ au_tidaddr64_t tid;
+} au_proc64ex_t;
+
/*
* error status 1 byte
* return value 4 bytes/8 bytes (32-bit/64-bit value)
@@ -616,6 +633,17 @@ typedef struct {
au_tidaddr32_t tid;
} au_subject32ex_t;
+typedef struct {
+ u_int32_t auid;
+ u_int32_t euid;
+ u_int32_t egid;
+ u_int32_t ruid;
+ u_int32_t rgid;
+ u_int32_t pid;
+ u_int32_t sid;
+ au_tidaddr64_t tid;
+} au_subject64ex_t;
+
/*
* text length 2 bytes
* text N bytes + 1 terminating NULL byte
@@ -625,6 +653,15 @@ typedef struct {
char *text;
} au_text_t;
+/*
+ * zonename length 2 bytes
+ * zonename text N bytes + 1 NULL terminator
+ */
+typedef struct {
+ u_int16_t len;
+ char *zonename;
+} au_zonename_t;
+
typedef struct {
u_int32_t ident;
u_int16_t filter;
@@ -675,8 +712,9 @@ struct tokenstr {
au_opaque_t opaque;
au_path_t path;
au_proc32_t proc32;
- au_proc64_t proc64;
au_proc32ex_t proc32_ex;
+ au_proc64_t proc64;
+ au_proc64ex_t proc64_ex;
au_ret32_t ret32;
au_ret64_t ret64;
au_seq_t seq;
@@ -685,12 +723,14 @@ struct tokenstr {
au_socketinet32_t sockinet32;
au_socketunix_t sockunix;
au_subject32_t subj32;
- au_subject64_t subj64;
au_subject32ex_t subj32_ex;
+ au_subject64_t subj64;
+ au_subject64ex_t subj64_ex;
au_text_t text;
au_kevent_t kevent;
au_invalid_t invalid;
au_trailer_t trail;
+ au_zonename_t zonename;
} tt; /* The token is one of the above types */
};
@@ -771,6 +811,14 @@ int au_fetch_tok(tokenstr_t *tok, u_char *buf, int len);
//XXX The following interface has different prototype from BSM
void au_print_tok(FILE *outfp, tokenstr_t *tok,
char *del, char raw, char sfrm);
+void au_print_tok_xml(FILE *outfp, tokenstr_t *tok,
+ char *del, char raw, char sfrm);
+
+/*
+ * Functions relating to XML output.
+ */
+void au_print_xml_header(FILE *outfp);
+void au_print_xml_footer(FILE *outfp);
__END_DECLS
/*
OpenPOWER on IntegriCloud