1/*-
2 * Copyright (c) 2008 Apple Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 12 unchanged lines hidden (view full) ---
21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
26 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 * POSSIBILITY OF SUCH DAMAGE.
28 *
29 * $P4: //depot/projects/trustedbsd/openbsm/bsm/auditd_lib.h#3 $
30 */
31
32#ifndef _BSM_AUDITD_LIB_H_
33#define _BSM_AUDITD_LIB_H_
34
35/*
36 * Lengths for audit trail file components.
37 */
--- 38 unchanged lines hidden (view full) ---
76#define ADE_ACTLERR -11 /* "Hard" error with auditctl(2). */
77#define ADE_SWAPERR -12 /* The audit trail file could not be swap. */
78#define ADE_RENAME -13 /* Error renaming crash recovery file. */
79#define ADE_READLINK -14 /* Error reading 'current' link. */
80#define ADE_SYMLINK -15 /* Error creating 'current' link. */
81#define ADE_INVAL -16 /* Invalid argument. */
82#define ADE_GETADDR -17 /* Error resolving address from hostname. */
83#define ADE_ADDRFAM -18 /* Address family not supported. */
84
85/*
86 * auditd_lib functions.
87 */
88const char *auditd_strerror(int errcode);
89int auditd_set_minfree(void);
90int auditd_read_dirs(int (*warn_soft)(char *), int (*warn_hard)(char *));
91void auditd_close_dirs(void);
92int auditd_set_evcmap(void);
93int auditd_set_namask(void);
94int auditd_set_policy(void);
95int auditd_set_fsize(void);
96int auditd_set_host(void);
97int auditd_swap_trail(char *TS, char **newfile, gid_t gid,
98 int (*warn_getacdir)(char *));
99int auditd_prevent_audit(void);
100int auditd_gen_record(int event, char *path);
101int auditd_new_curlink(char *curfile);
102int audit_quick_start(void);
103int audit_quick_stop(void);
104
105#endif /* !_BSM_AUDITD_LIB_H_ */
2 * Copyright (c) 2008 Apple Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 12 unchanged lines hidden (view full) ---
21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
26 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 * POSSIBILITY OF SUCH DAMAGE.
28 *
29 * $P4: //depot/projects/trustedbsd/openbsm/bsm/auditd_lib.h#3 $
30 */
31
32#ifndef _BSM_AUDITD_LIB_H_
33#define _BSM_AUDITD_LIB_H_
34
35/*
36 * Lengths for audit trail file components.
37 */
--- 38 unchanged lines hidden (view full) ---
76#define ADE_ACTLERR -11 /* "Hard" error with auditctl(2). */
77#define ADE_SWAPERR -12 /* The audit trail file could not be swap. */
78#define ADE_RENAME -13 /* Error renaming crash recovery file. */
79#define ADE_READLINK -14 /* Error reading 'current' link. */
80#define ADE_SYMLINK -15 /* Error creating 'current' link. */
81#define ADE_INVAL -16 /* Invalid argument. */
82#define ADE_GETADDR -17 /* Error resolving address from hostname. */
83#define ADE_ADDRFAM -18 /* Address family not supported. */
84
85/*
86 * auditd_lib functions.
87 */
88const char *auditd_strerror(int errcode);
89int auditd_set_minfree(void);
90int auditd_read_dirs(int (*warn_soft)(char *), int (*warn_hard)(char *));
91void auditd_close_dirs(void);
92int auditd_set_evcmap(void);
93int auditd_set_namask(void);
94int auditd_set_policy(void);
95int auditd_set_fsize(void);
96int auditd_set_host(void);
97int auditd_swap_trail(char *TS, char **newfile, gid_t gid,
98 int (*warn_getacdir)(char *));
99int auditd_prevent_audit(void);
100int auditd_gen_record(int event, char *path);
101int auditd_new_curlink(char *curfile);
102int audit_quick_start(void);
103int audit_quick_stop(void);
104
105#endif /* !_BSM_AUDITD_LIB_H_ */