audit.h (155191) | audit.h (156289) |
---|---|
1/* 2 * Copyright (c) 2005 Apple Computer, Inc. 3 * All rights reserved. 4 * 5 * @APPLE_BSD_LICENSE_HEADER_START@ 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * 31 * @APPLE_BSD_LICENSE_HEADER_END@ 32 * | 1/* 2 * Copyright (c) 2005 Apple Computer, Inc. 3 * All rights reserved. 4 * 5 * @APPLE_BSD_LICENSE_HEADER_START@ 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * 31 * @APPLE_BSD_LICENSE_HEADER_END@ 32 * |
33 * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#22 $ 34 * $FreeBSD: head/sys/bsm/audit.h 155191 2006-02-01 19:54:22Z rwatson $ | 33 * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#24 $ 34 * $FreeBSD: head/sys/bsm/audit.h 156289 2006-03-04 16:54:21Z rwatson $ |
35 */ 36 37#ifndef _BSM_AUDIT_H 38#define _BSM_AUDIT_H 39 40#include <sys/param.h> 41#include <sys/cdefs.h> 42#include <sys/queue.h> --- 210 unchanged lines hidden (view full) --- 253 pid_t ap_pid; /* ID of target process. */ 254 au_id_t ap_auid; /* Audit user ID. */ 255 au_mask_t ap_mask; /* Audit masks. */ 256 au_tid_addr_t ap_termid; /* Terminal ID. */ 257 au_asid_t ap_asid; /* Audit session ID. */ 258}; 259typedef struct auditpinfo_addr auditpinfo_addr_t; 260 | 35 */ 36 37#ifndef _BSM_AUDIT_H 38#define _BSM_AUDIT_H 39 40#include <sys/param.h> 41#include <sys/cdefs.h> 42#include <sys/queue.h> --- 210 unchanged lines hidden (view full) --- 253 pid_t ap_pid; /* ID of target process. */ 254 au_id_t ap_auid; /* Audit user ID. */ 255 au_mask_t ap_mask; /* Audit masks. */ 256 au_tid_addr_t ap_termid; /* Terminal ID. */ 257 au_asid_t ap_asid; /* Audit session ID. */ 258}; 259typedef struct auditpinfo_addr auditpinfo_addr_t; 260 |
261/* Token and record structures. */ 262 263struct au_token { 264 u_char *t_data; 265 size_t len; 266 TAILQ_ENTRY(au_token) tokens; 267}; | 261/* 262 * Contents of token_t are opaque outside of libbsm. 263 */ |
268typedef struct au_token token_t; 269 | 264typedef struct au_token token_t; 265 |
270struct au_record { 271 char used; /* Record currently in use? */ 272 int desc; /* Descriptor for record. */ 273 TAILQ_HEAD(, au_token) token_q; /* Queue of BSM tokens. */ 274 u_char *data; 275 size_t len; 276 LIST_ENTRY(au_record) au_rec_q; 277}; 278typedef struct au_record au_record_t; 279 | |
280/* 281 * Kernel audit queue control parameters. 282 */ 283struct au_qctrl { 284 size_t aq_hiwater; 285 size_t aq_lowater; 286 size_t aq_bufsz; 287 clock_t aq_delay; --- 35 unchanged lines hidden (view full) --- 323 * Audit to event class mapping. 324 */ 325struct au_evclass_map { 326 au_event_t ec_number; 327 au_class_t ec_class; 328}; 329typedef struct au_evclass_map au_evclass_map_t; 330 | 266/* 267 * Kernel audit queue control parameters. 268 */ 269struct au_qctrl { 270 size_t aq_hiwater; 271 size_t aq_lowater; 272 size_t aq_bufsz; 273 clock_t aq_delay; --- 35 unchanged lines hidden (view full) --- 309 * Audit to event class mapping. 310 */ 311struct au_evclass_map { 312 au_event_t ec_number; 313 au_class_t ec_class; 314}; 315typedef struct au_evclass_map au_evclass_map_t; 316 |
317/* 318 * Audit system calls. 319 */ |
|
331#if !defined(_KERNEL) && !defined(KERNEL) 332int audit(const void *, int); 333int auditon(int, void *, int); 334int auditctl(const char *); 335int getauid(au_id_t *); 336int setauid(const au_id_t *); 337int getaudit(struct auditinfo *); 338int setaudit(const struct auditinfo *); 339int getaudit_addr(struct auditinfo_addr *, int); 340int setaudit_addr(const struct auditinfo_addr *, int); 341#endif /* defined(_KERNEL) || defined(KERNEL) */ 342 343__END_DECLS 344 345#endif /* !_BSM_AUDIT_H */ | 320#if !defined(_KERNEL) && !defined(KERNEL) 321int audit(const void *, int); 322int auditon(int, void *, int); 323int auditctl(const char *); 324int getauid(au_id_t *); 325int setauid(const au_id_t *); 326int getaudit(struct auditinfo *); 327int setaudit(const struct auditinfo *); 328int getaudit_addr(struct auditinfo_addr *, int); 329int setaudit_addr(const struct auditinfo_addr *, int); 330#endif /* defined(_KERNEL) || defined(KERNEL) */ 331 332__END_DECLS 333 334#endif /* !_BSM_AUDIT_H */ |