xnu-4903.241.1/bsd/security/audit/audit_pipe.c
/*
 * Delete a per-auid mask on an audit pipe.
 */
Delete a per-auid mask on an audit pipe.
Delete a per - auid mask on an audit pipe .
static int
audit_pipe_preselect_delete(struct audit_pipe *ap, au_id_t auid)
{
	struct audit_pipe_preselect *app;
	int error;
	AUDIT_PIPE_LOCK(ap);
	app = audit_pipe_preselect_find(ap, auid);
	if (app != NULL) {
		TAILQ_REMOVE(&ap->ap_preselect_list, app, app_list);
		error = 0;
	} else
		error = ENOENT;
	AUDIT_PIPE_UNLOCK(ap);
	if (app != NULL)
		free(app, M_AUDIT_PIPE_PRESELECT);
	return (error);
}
static int audit_pipe_preselect_delete ( struct audit_pipe * ap , au_id_t auid ) { struct audit_pipe_preselect * app ; int error ; AUDIT_PIPE_LOCK ( ap ) ; app = audit_pipe_preselect_find ( ap , auid ) ; if ( app != NULL ) { TAILQ_REMOVE ( & ap -> ap_preselect_list , app , app_list ) ; error = 0 ; } else error = ENOENT ; AUDIT_PIPE_UNLOCK ( ap ) ; if ( app != NULL ) free ( app , M_AUDIT_PIPE_PRESELECT ) ; return ( error ) ; }
Delete a per-auid mask on an audit pipe.
Delete a per - auid mask on an audit pipe .