Clean up, and sometimes remove, a number of audit-related implementation

comments.

Obtained from:	TrutstedBSD Project
This commit is contained in:
Robert Watson 2007-06-11 22:10:54 +00:00
parent 3707b02b7e
commit 3666798f15
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170585
3 changed files with 3 additions and 32 deletions

View file

@ -340,8 +340,6 @@ audit_commit(struct kaudit_record *ar, int error, int retval)
/*
* Decide whether to commit the audit record by checking the error
* value from the system call and using the appropriate audit mask.
*
* XXXAUDIT: Synchronize access to audit_nae_mask?
*/
if (ar->k_ar.ar_subj_auid == AU_DEFAUDITID)
aumask = &audit_nae_mask;
@ -370,7 +368,7 @@ audit_commit(struct kaudit_record *ar, int error, int retval)
break;
case AUE_AUDITON:
/* Convert the auditon() command to an event */
/* Convert the auditon() command to an event. */
ar->k_ar.ar_event = auditon_command_event(ar->k_ar.ar_arg_cmd);
break;
}
@ -396,15 +394,6 @@ audit_commit(struct kaudit_record *ar, int error, int retval)
ar->k_ar.ar_errno = error;
ar->k_ar.ar_retval = retval;
/*
* We might want to do some system-wide post-filtering here at some
* point.
*/
/*
* Timestamp system call end.
*/
nanotime(&ar->k_ar.ar_endtime);
/*
@ -530,9 +519,6 @@ audit_syscall_exit(int error, struct thread *td)
td->td_ar = NULL;
}
/*
* Copy audit state from an existing credential to a new credential.
*/
void
audit_cred_copy(struct ucred *src, struct ucred *dest)
{
@ -540,19 +526,12 @@ audit_cred_copy(struct ucred *src, struct ucred *dest)
bcopy(&src->cr_audit, &dest->cr_audit, sizeof(dest->cr_audit));
}
/*
* Free audit state from a credential when the credential is freed.
*/
void
audit_cred_destroy(struct ucred *cred)
{
bzero(&cred->cr_audit, sizeof(cred->cr_audit));
}
/*
* Allocate audit state for a new credential.
*/
void
audit_cred_init(struct ucred *cred)
{
@ -568,6 +547,7 @@ void
audit_cred_kproc0(struct ucred *cred)
{
cred->cr_audit.ai_auid = AU_DEFAUDITID;
}
void
@ -577,9 +557,6 @@ audit_cred_proc1(struct ucred *cred)
cred->cr_audit.ai_auid = AU_DEFAUDITID;
}
/*
* Allocate storage for a new thread.
*/
void
audit_thread_alloc(struct thread *td)
{
@ -587,9 +564,6 @@ audit_thread_alloc(struct thread *td)
td->td_ar = NULL;
}
/*
* Thread destruction.
*/
void
audit_thread_free(struct thread *td)
{

View file

@ -60,7 +60,7 @@
* hasn't already been filled in?
*/
void
audit_arg_addr(void * addr)
audit_arg_addr(void *addr)
{
struct kaudit_record *ar;

View file

@ -55,9 +55,6 @@
MALLOC_DEFINE(M_AUDITBSM, "audit_bsm", "Audit BSM data");
/*
* Forward declares.
*/
static void audit_sys_auditon(struct audit_record *ar,
struct au_record *rec);