xref: /titanic_44/usr/src/lib/libbsm/common/audit_private.h (revision c28749e97052f09388969427adf7df641cdcdc22)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  *
26  * Do not add to this file unless it is to cover an existing private
27  * interface and do not write new code that depends on this header
28  * file or the interfaces contained in it.
29  *
30  * This is a private interface, subject to change.  It exists solely
31  * as a way of making certain existing clients of libbsm lint clean.
32  * As the related interfaces are replaced with the adt.* interfaces,
33  * this header should shrink to zero.
34  */
35 
36 #ifndef _AUDIT_PRIVATE_H
37 #define	_AUDIT_PRIVATE_H
38 
39 #pragma ident	"%Z%%M%	%I%	%E% SMI"
40 
41 #ifdef	__cplusplus
42 extern "C" {
43 #endif
44 
45 #include <bsm/libbsm.h>
46 #include <pwd.h>
47 
48 /*
49  * audit_settid.c
50  * interface users
51  * rexecd
52  * rlogind
53  * rshd
54  * telnetd
55  * rexd
56  */
57 extern	int	audit_settid(int);
58 
59 /*
60  * audit_allocate.c
61  * interface user
62  * allocate
63  */
64 extern	void	audit_allocate_argv(int, int, char *[]);
65 extern	int	audit_allocate_record(int);
66 extern	void	audit_allocate_list(char *);
67 extern	void	audit_allocate_device(char *);
68 
69 /*
70  * audit_ftpd.c
71  * interface user
72  * ftpd
73  */
74 extern	void	audit_ftpd_bad_pw(char *uname);
75 extern	void	audit_ftpd_excluded(char *uname);
76 extern	void	audit_ftpd_failure(char *uname);
77 extern	void	audit_ftpd_no_anon(void);
78 extern	void	audit_ftpd_success(char *uname);
79 extern	void	audit_ftpd_unknown(char *uname);
80 extern	void	audit_ftpd_logout(void);
81 
82 /*
83  * audit_rexecd.c
84  * interface user
85  * rexecd
86  */
87 extern	void	audit_rexecd_setup(void);
88 extern	void	audit_rexecd_success(char *, char *, char *);
89 extern	void	audit_rexecd_fail(char *, char *, char *, char *);
90 
91 /*
92  * audit_rshd.c
93  * interface user
94  * rshd
95  */
96 extern	int	audit_rshd_setup(void);
97 extern	int	audit_rshd_success(char *, char *, char *, char *);
98 extern	int	audit_rshd_fail(char *, char *, char *, char *, char *);
99 
100 /*
101  * audit_inetd.c
102  * interface user
103  * inetd
104  */
105 extern	int	audit_inetd_service(char *, struct passwd *);
106 extern	int	audit_inetd_config(void);
107 extern	int	audit_inetd_termid(int);
108 
109 /*
110  * audit_at.c
111  * interface users
112  * atrm
113  * at
114  */
115 extern	int	audit_at_delete(char *, char *, int);
116 extern	int	audit_at_create(char *, int);
117 
118 /*
119  * audit_crontab.c
120  * interface user
121  * crontab
122  */
123 extern	int	audit_crontab_modify(char *, char *, int);
124 extern	int	audit_crontab_delete(char *, int);
125 extern	int	audit_crontab_not_allowed(uid_t, char *);
126 extern	int	audit_crontab_process_not_audited(void);
127 
128 /*
129  * audit_cron.c
130  * interface users
131  * cron
132  * at
133  */
134 extern	int	audit_cron_session(char *, char *, uid_t, gid_t, char *);
135 extern	void	audit_cron_new_job(char *, int, void *);
136 extern	void	audit_cron_bad_user(char *);
137 extern	void	audit_cron_user_acct_expired(char *);
138 extern	int	audit_cron_create_anc_file(char *, char *, char *, uid_t);
139 extern	int	audit_cron_delete_anc_file(char *, char *);
140 extern	int	audit_cron_is_anc_name(char *);
141 extern	int	audit_cron_mode(void);
142 extern	char	*audit_cron_make_anc_name(char *);
143 extern	int	audit_cron_setinfo(char *, auditinfo_addr_t *);
144 
145 /*
146  * audit_mountd.c
147  * interface user
148  * mountd
149  */
150 extern	void	audit_mountd_setup(void);
151 extern	void	audit_mountd_mount(char *, char *, int);
152 extern	void	audit_mountd_umount(char *, char *);
153 
154 /*
155  * audit_halt.c
156  * interface user
157  * halt
158  */
159 extern	int	audit_halt_setup(int, char **);
160 extern	int	audit_halt_success(void);
161 extern	int	audit_halt_fail(void);
162 
163 /*
164  * audit_shutdown.c
165  * interface user
166  * shutdown
167  */
168 extern	int	audit_shutdown_setup(int, char **);
169 extern	int	audit_shutdown_success(void);
170 extern	int	audit_shutdown_fail(void);
171 
172 /*
173  * audit_reboot.c
174  * interface user
175  * halt
176  */
177 extern	int	audit_reboot_setup(void);
178 extern	int	audit_reboot_success(void);
179 extern	int	audit_reboot_fail(void);
180 
181 /*
182  * audit_login.c
183  * login
184  */
185 extern	int	audit_login_save_flags(int, int);
186 extern	int	audit_login_save_host(char *);
187 extern	int	audit_login_save_ttyn(char *);
188 extern	int	audit_login_save_port(void);
189 extern	int	audit_login_save_machine(void);
190 extern	int	audit_login_success(void);
191 extern	int	audit_login_save_pw(struct passwd *);
192 extern	int	audit_login_bad_pw(void);
193 extern	int	audit_login_maxtrys(void);
194 extern	int	audit_login_not_console(void);
195 extern	int	audit_login_bad_dialup(void);
196 extern	int	audit_login_maxtrys(void);
197 
198 /*
199  * audit_newgrp.c
200  * newgrp
201  */
202 extern	void	audit_newgrp_login(char *, int);
203 
204 /*
205  * audit_rexd.c
206  * interface users
207  * rpc.rexd
208  */
209 extern	void 	audit_rexd_fail(char *, char *, char *, uid_t, gid_t,
210     char *, char **);
211 extern	void	audit_rexd_success(char *, char *, uid_t, gid_t,
212     char *, char **);
213 extern	void	audit_rexd_setup(void);
214 
215 /*
216  * audit_uadmin.c
217  * interface user
218  * uadmin
219  */
220 extern	int	audit_uadmin_setup(int, char **);
221 extern	int	audit_uadmin_success(void);
222 
223 /*
224  * audit_su.c
225  * interface user
226  * su
227  */
228 extern	void	audit_su_bad_authentication(void);
229 extern	void	audit_su_bad_uid(uid_t);
230 extern	void	audit_su_bad_username(void);
231 extern	void	audit_su_init_info(char *, char *);
232 extern	void	audit_su_reset_ai(void);
233 extern	void	audit_su_success(void);
234 extern	void	audit_su_unknown_failure(void);
235 
236 #ifdef	__cplusplus
237 }
238 #endif
239 
240 #endif	/* _AUDIT_PRIVATE_H */
241