_audit.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef __AUDIT_DOT_H
#define __AUDIT_DOT_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef _ASM
#include <rtld.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Define all auditing structures.
*
* A shared object may be a client of an audit library, in which case the
* identify of the shared object is passed to the auditor using a cookie.
*/
typedef struct {
} Audit_client;
#define FLG_AC_BINDTO 0x00001
#define FLG_AC_BINDFROM 0x00002
/*
* Each shared object being audited may provide a list of client structures
* and dynamic plts (one per auditor).
*/
struct audit_info {
void * ai_dynplts; /* array of dynamic plts */
};
/*
* Define an Audit Descriptor - each audit object is added to this descriptor
* as an Audit Interface. There is one global audit descriptor - auditors,
* and a specific object my require its own - AUDITORS(lmp).
*/
struct audit_desc {
char *ad_name; /* originating audit names */
};
/*
* Define an Audit List descriptor for each audit object.
*/
struct audit_list {
const char *al_libname; /* object name for diagnostics */
void (*al_preinit)(uintptr_t *);
uint_t);
#if defined(_ELF64)
void *, uint_t *, const char *);
uintptr_t, const char *);
#else
void *, uint_t *);
#endif /* _ELF64 */
};
/*
* Link-Edit audit functions
*/
extern void audit_info_cleanup(Audit_info *);
extern void audit_preinit(Rt_map *);
void *, uint_t *);
uint_t);
extern uint_t audit_flags;
#endif /* _ASM */
/*
* Values for audit_flags. Intended to be the same as the LML equivalents
* but kept in a separate variable to simplify boot_elf.s coding.
*/
#ifdef __cplusplus
}
#endif
#endif /* __AUDIT_DOT_H */