Don't ifdef KDTRACE_HOOKS struct, variable, and function prototype
definitions for the DTrace audit provider, so that the dtaudit module can compile in the absence of kernel DTrace support. This doesn't really make run-time sense (since the binary dependencies for the module won't be present), but it allows the dtaudit module to compile successfully regardless of the kernel configuration. MFC after: 3 weeks Sponsored by: DARPA, AFRL Reported by: kib
This commit is contained in:
parent
9532aae589
commit
7cad64f796
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=316271
@ -327,9 +327,7 @@ struct kaudit_record {
|
||||
void *k_udata; /* User data. */
|
||||
u_int k_ulen; /* User data length. */
|
||||
struct uthread *k_uthread; /* Audited thread. */
|
||||
#ifdef KDTRACE_HOOKS
|
||||
void *k_dtaudit_state;
|
||||
#endif
|
||||
TAILQ_ENTRY(kaudit_record) k_q;
|
||||
};
|
||||
TAILQ_HEAD(kaudit_queue, kaudit_record);
|
||||
@ -401,7 +399,6 @@ struct evname_elem {
|
||||
LIST_ENTRY(evname_elem) ene_entry; /* (m) */
|
||||
struct mtx ene_lock;
|
||||
|
||||
#ifdef KDTRACE_HOOKS
|
||||
/* DTrace probe IDs; 0 if not yet registered. */
|
||||
uint32_t ene_commit_probe_id; /* (M) */
|
||||
uint32_t ene_bsm_probe_id; /* (M) */
|
||||
@ -409,7 +406,6 @@ struct evname_elem {
|
||||
/* Flags indicating if the probes enabled or not. */
|
||||
int ene_commit_probe_enabled; /* (M) */
|
||||
int ene_bsm_probe_enabled; /* (M) */
|
||||
#endif
|
||||
};
|
||||
|
||||
#define EVNAME_LOCK(ene) mtx_lock(&(ene)->ene_lock)
|
||||
@ -424,7 +420,6 @@ typedef void (*au_evnamemap_callback_t)(struct evname_elem *ene);
|
||||
* DTrace audit provider (dtaudit) hooks -- to be set non-NULL when the audit
|
||||
* provider is loaded and ready to be called into.
|
||||
*/
|
||||
#ifdef KDTRACE_HOOKS
|
||||
extern void *(*dtaudit_hook_preselect)(au_id_t auid, au_event_t event,
|
||||
au_class_t class);
|
||||
extern int (*dtaudit_hook_commit)(struct kaudit_record *kar,
|
||||
@ -433,7 +428,6 @@ extern int (*dtaudit_hook_commit)(struct kaudit_record *kar,
|
||||
extern void (*dtaudit_hook_bsm)(struct kaudit_record *kar, au_id_t auid,
|
||||
au_event_t event, au_class_t class, int sorf,
|
||||
void *bsm_data, size_t bsm_len);
|
||||
#endif /* !KDTRACE_HOOKS */
|
||||
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -457,9 +451,7 @@ au_class_t au_event_class(au_event_t event);
|
||||
void au_evnamemap_init(void);
|
||||
void au_evnamemap_insert(au_event_t event, const char *name);
|
||||
void au_evnamemap_foreach(au_evnamemap_callback_t callback);
|
||||
#ifdef KDTRACE_HOOKS
|
||||
struct evname_elem *au_evnamemap_lookup(au_event_t event);
|
||||
#endif
|
||||
int au_event_name(au_event_t event, char *name);
|
||||
au_event_t audit_ctlname_to_sysctlevent(int name[], uint64_t valid_arg);
|
||||
au_event_t audit_flags_and_error_to_openevent(int oflags, int error);
|
||||
|
Loading…
Reference in New Issue
Block a user