1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  *
25  * Do not add to this file unless it is to cover an existing private
26  * interface and do not write new code that depends on this header
27  * file or the interfaces contained in it.
28  *
29  * This is a private interface, subject to change.  It exists solely
30  * as a way of making certain existing clients of libbsm lint clean.
31  * As the related interfaces are replaced with the adt.* interfaces,
32  * this header should shrink to zero.
33  */
34 
35 #ifndef _AUDIT_PRIVATE_H
36 #define	_AUDIT_PRIVATE_H
37 
38 #ifdef	__cplusplus
39 extern "C" {
40 #endif
41 
42 #include <bsm/libbsm.h>
43 #include <pwd.h>
44 
45 /*
46  * audit_settid.c
47  * interface users
48  * rexecd
49  * rlogind
50  * rshd
51  * telnetd
52  * rexd
53  */
54 extern	int	audit_settid(int);
55 
56 /*
57  * audit_allocate.c
58  * interface user
59  * allocate
60  */
61 extern	void	audit_allocate_argv(int, int, char *[]);
62 extern	int	audit_allocate_record(int);
63 extern	void	audit_allocate_list(char *);
64 extern	void	audit_allocate_device(char *);
65 
66 /*
67  * audit_ftpd.c
68  * interface user
69  * ftpd
70  */
71 extern	void	audit_ftpd_bad_pw(char *uname);
72 extern	void	audit_ftpd_excluded(char *uname);
73 extern	void	audit_ftpd_failure(char *uname);
74 extern	void	audit_ftpd_no_anon(void);
75 extern	void	audit_ftpd_success(char *uname);
76 extern	void	audit_ftpd_unknown(char *uname);
77 extern	void	audit_ftpd_logout(void);
78 
79 /*
80  * audit_rexecd.c
81  * interface user
82  * rexecd
83  */
84 extern	void	audit_rexecd_setup(void);
85 extern	void	audit_rexecd_success(char *, char *, char *);
86 extern	void	audit_rexecd_fail(char *, char *, char *, char *);
87 
88 /*
89  * audit_rshd.c
90  * interface user
91  * rshd
92  */
93 extern	int	audit_rshd_setup(void);
94 extern	int	audit_rshd_success(char *, char *, char *, char *);
95 extern	int	audit_rshd_fail(char *, char *, char *, char *, char *);
96 
97 /*
98  * audit_at.c
99  * interface users
100  * atrm
101  * at
102  */
103 extern	int	audit_at_delete(char *, char *, int);
104 extern	int	audit_at_create(char *, int);
105 
106 /*
107  * audit_crontab.c
108  * interface user
109  * crontab
110  */
111 extern	int	audit_crontab_modify(char *, char *, int);
112 extern	int	audit_crontab_delete(char *, int);
113 extern	int	audit_crontab_not_allowed(uid_t, char *);
114 extern	int	audit_crontab_process_not_audited(void);
115 
116 /*
117  * audit_cron.c
118  * interface users
119  * cron
120  * at
121  */
122 extern	int	audit_cron_session(char *, char *, uid_t, gid_t, char *);
123 extern	void	audit_cron_new_job(char *, int, void *);
124 extern	void	audit_cron_bad_user(char *);
125 extern	void	audit_cron_user_acct_expired(char *);
126 extern	int	audit_cron_create_anc_file(char *, char *, char *, uid_t);
127 extern	int	audit_cron_delete_anc_file(char *, char *);
128 extern	int	audit_cron_is_anc_name(char *);
129 extern	int	audit_cron_mode(void);
130 extern	char	*audit_cron_make_anc_name(char *);
131 extern	int	audit_cron_setinfo(char *, auditinfo_addr_t *);
132 
133 /*
134  * audit_mountd.c
135  * interface user
136  * mountd
137  */
138 extern	void	audit_mountd_setup(void);
139 extern	void	audit_mountd_mount(char *, char *, int);
140 extern	void	audit_mountd_umount(char *, char *);
141 
142 /*
143  * audit_halt.c
144  * interface user
145  * halt
146  */
147 extern	int	audit_halt_setup(int, char **);
148 extern	int	audit_halt_success(void);
149 extern	int	audit_halt_fail(void);
150 
151 /*
152  * audit_shutdown.c
153  * interface user
154  * shutdown
155  */
156 extern	int	audit_shutdown_setup(int, char **);
157 extern	int	audit_shutdown_success(void);
158 extern	int	audit_shutdown_fail(void);
159 
160 /*
161  * audit_reboot.c
162  * interface user
163  * halt
164  */
165 extern	int	audit_reboot_setup(void);
166 extern	int	audit_reboot_success(void);
167 extern	int	audit_reboot_fail(void);
168 
169 /*
170  * audit_rexd.c
171  * interface users
172  * rpc.rexd
173  */
174 extern	void 	audit_rexd_fail(char *, char *, char *, uid_t, gid_t,
175     char *, char **);
176 extern	void	audit_rexd_success(char *, char *, uid_t, gid_t,
177     char *, char **);
178 extern	void	audit_rexd_setup(void);
179 
180 #ifdef	__cplusplus
181 }
182 #endif
183 
184 #endif	/* _AUDIT_PRIVATE_H */
185