Update src/sys/bsm for OpenBSM 1.0 alpha 5 changes:
- Add new comments. - Move private data structures from public audit.h to audit_internal.h to avoid exposing queue.h macros to undesiring consumers. Obtained from: TrustedBSD Project
This commit is contained in:
parent
736123b8c2
commit
d39e49362c
@ -30,7 +30,7 @@
|
||||
*
|
||||
* @APPLE_BSD_LICENSE_HEADER_END@
|
||||
*
|
||||
* $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#22 $
|
||||
* $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#24 $
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
@ -258,25 +258,11 @@ struct auditpinfo_addr {
|
||||
};
|
||||
typedef struct auditpinfo_addr auditpinfo_addr_t;
|
||||
|
||||
/* Token and record structures. */
|
||||
|
||||
struct au_token {
|
||||
u_char *t_data;
|
||||
size_t len;
|
||||
TAILQ_ENTRY(au_token) tokens;
|
||||
};
|
||||
/*
|
||||
* Contents of token_t are opaque outside of libbsm.
|
||||
*/
|
||||
typedef struct au_token token_t;
|
||||
|
||||
struct au_record {
|
||||
char used; /* Record currently in use? */
|
||||
int desc; /* Descriptor for record. */
|
||||
TAILQ_HEAD(, au_token) token_q; /* Queue of BSM tokens. */
|
||||
u_char *data;
|
||||
size_t len;
|
||||
LIST_ENTRY(au_record) au_rec_q;
|
||||
};
|
||||
typedef struct au_record au_record_t;
|
||||
|
||||
/*
|
||||
* Kernel audit queue control parameters.
|
||||
*/
|
||||
@ -328,6 +314,9 @@ struct au_evclass_map {
|
||||
};
|
||||
typedef struct au_evclass_map au_evclass_map_t;
|
||||
|
||||
/*
|
||||
* Audit system calls.
|
||||
*/
|
||||
#if !defined(_KERNEL) && !defined(KERNEL)
|
||||
int audit(const void *, int);
|
||||
int auditon(int, void *, int);
|
||||
|
@ -34,12 +34,16 @@
|
||||
*
|
||||
* @APPLE_BSD_LICENSE_HEADER_END@
|
||||
*
|
||||
* $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_internal.h#5 $
|
||||
* $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_internal.h#7 $
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _LIBBSM_INTERNAL_H
|
||||
#define _LIBBSM_INTERNAL_H
|
||||
#ifndef _AUDIT_INTERNAL_H
|
||||
#define _AUDIT_INTERNAL_H
|
||||
|
||||
#if defined(__linux__) && !defined(__unused)
|
||||
#define __unused
|
||||
#endif
|
||||
|
||||
/*
|
||||
* audit_internal.h contains private interfaces that are shared by user space
|
||||
@ -48,6 +52,22 @@
|
||||
* broken with future releases of OpenBSM, which may delete, modify, or
|
||||
* otherwise break these interfaces or the assumptions they rely on.
|
||||
*/
|
||||
struct au_token {
|
||||
u_char *t_data;
|
||||
size_t len;
|
||||
TAILQ_ENTRY(au_token) tokens;
|
||||
};
|
||||
|
||||
struct au_record {
|
||||
char used; /* Record currently in use? */
|
||||
int desc; /* Descriptor for record. */
|
||||
TAILQ_HEAD(, au_token) token_q; /* Queue of BSM tokens. */
|
||||
u_char *data;
|
||||
size_t len;
|
||||
LIST_ENTRY(au_record) au_rec_q;
|
||||
};
|
||||
typedef struct au_record au_record_t;
|
||||
|
||||
|
||||
/* We could determined the header and trailer sizes by
|
||||
* defining appropriate structures. We hold off that approach
|
||||
@ -97,4 +117,4 @@
|
||||
|
||||
#define ADD_STRING(loc, data, size) ADD_MEM(loc, data, size)
|
||||
|
||||
#endif /* !_LIBBSM_INTERNAL_H_ */
|
||||
#endif /* !_AUDIT_INTERNAL_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user