xref: /titanic_52/usr/src/lib/libbsm/common/audit_private.h (revision ba4e3c84e6b9390bbf7df80b5f1d11dec34cc525)
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 2006 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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
39 
40 #ifdef	__cplusplus
41 extern "C" {
42 #endif
43 
44 #include <bsm/libbsm.h>
45 #include <pwd.h>
46 
47 /*
48  * audit_settid.c
49  * interface users
50  * rexecd
51  * rlogind
52  * rshd
53  * telnetd
54  * rexd
55  */
56 extern	int	audit_settid(int);
57 
58 /*
59  * audit_allocate.c
60  * interface user
61  * allocate
62  */
63 extern	void	audit_allocate_argv(int, int, char *[]);
64 extern	int	audit_allocate_record(int);
65 extern	void	audit_allocate_list(char *);
66 extern	void	audit_allocate_device(char *);
67 
68 /*
69  * audit_ftpd.c
70  * interface user
71  * ftpd
72  */
73 extern	void	audit_ftpd_bad_pw(char *uname);
74 extern	void	audit_ftpd_excluded(char *uname);
75 extern	void	audit_ftpd_failure(char *uname);
76 extern	void	audit_ftpd_no_anon(void);
77 extern	void	audit_ftpd_success(char *uname);
78 extern	void	audit_ftpd_unknown(char *uname);
79 extern	void	audit_ftpd_logout(void);
80 
81 /*
82  * audit_rexecd.c
83  * interface user
84  * rexecd
85  */
86 extern	void	audit_rexecd_setup(void);
87 extern	void	audit_rexecd_success(char *, char *, char *);
88 extern	void	audit_rexecd_fail(char *, char *, char *, char *);
89 
90 /*
91  * audit_rshd.c
92  * interface user
93  * rshd
94  */
95 extern	int	audit_rshd_setup(void);
96 extern	int	audit_rshd_success(char *, char *, char *, char *);
97 extern	int	audit_rshd_fail(char *, char *, char *, char *, char *);
98 
99 /*
100  * audit_inetd.c
101  * interface user
102  * inetd
103  */
104 extern	int	audit_inetd_service(char *, struct passwd *);
105 extern	int	audit_inetd_config(void);
106 extern	int	audit_inetd_termid(int);
107 
108 /*
109  * audit_at.c
110  * interface users
111  * atrm
112  * at
113  */
114 extern	int	audit_at_delete(char *, char *, int);
115 extern	int	audit_at_create(char *, int);
116 
117 /*
118  * audit_crontab.c
119  * interface user
120  * crontab
121  */
122 extern	int	audit_crontab_modify(char *, char *, int);
123 extern	int	audit_crontab_delete(char *, int);
124 extern	int	audit_crontab_not_allowed(uid_t, char *);
125 extern	int	audit_crontab_process_not_audited(void);
126 
127 /*
128  * audit_cron.c
129  * interface users
130  * cron
131  * at
132  */
133 extern	int	audit_cron_session(char *, char *, uid_t, gid_t, char *);
134 extern	void	audit_cron_new_job(char *, int, void *);
135 extern	void	audit_cron_bad_user(char *);
136 extern	void	audit_cron_user_acct_expired(char *);
137 extern	int	audit_cron_create_anc_file(char *, char *, char *, uid_t);
138 extern	int	audit_cron_delete_anc_file(char *, char *);
139 extern	int	audit_cron_is_anc_name(char *);
140 extern	int	audit_cron_mode(void);
141 extern	char	*audit_cron_make_anc_name(char *);
142 extern	int	audit_cron_setinfo(char *, auditinfo_addr_t *);
143 
144 /*
145  * audit_mountd.c
146  * interface user
147  * mountd
148  */
149 extern	void	audit_mountd_setup(void);
150 extern	void	audit_mountd_mount(char *, char *, int);
151 extern	void	audit_mountd_umount(char *, char *);
152 
153 /*
154  * audit_halt.c
155  * interface user
156  * halt
157  */
158 extern	int	audit_halt_setup(int, char **);
159 extern	int	audit_halt_success(void);
160 extern	int	audit_halt_fail(void);
161 
162 /*
163  * audit_shutdown.c
164  * interface user
165  * shutdown
166  */
167 extern	int	audit_shutdown_setup(int, char **);
168 extern	int	audit_shutdown_success(void);
169 extern	int	audit_shutdown_fail(void);
170 
171 /*
172  * audit_reboot.c
173  * interface user
174  * halt
175  */
176 extern	int	audit_reboot_setup(void);
177 extern	int	audit_reboot_success(void);
178 extern	int	audit_reboot_fail(void);
179 
180 /*
181  * audit_newgrp.c
182  * newgrp
183  */
184 extern	void	audit_newgrp_login(char *, int);
185 
186 /*
187  * audit_rexd.c
188  * interface users
189  * rpc.rexd
190  */
191 extern	void 	audit_rexd_fail(char *, char *, char *, uid_t, gid_t,
192     char *, char **);
193 extern	void	audit_rexd_success(char *, char *, uid_t, gid_t,
194     char *, char **);
195 extern	void	audit_rexd_setup(void);
196 
197 /*
198  * audit_uadmin.c
199  * interface user
200  * uadmin
201  */
202 extern	int	audit_uadmin_setup(int, char **);
203 extern	int	audit_uadmin_success(void);
204 
205 /*
206  * audit_su.c
207  * interface user
208  * su
209  */
210 extern	void	audit_su_bad_authentication(void);
211 extern	void	audit_su_bad_uid(uid_t);
212 extern	void	audit_su_bad_username(void);
213 extern	void	audit_su_init_info(char *, char *);
214 extern	void	audit_su_reset_ai(void);
215 extern	void	audit_su_success(void);
216 extern	void	audit_su_unknown_failure(void);
217 
218 #ifdef	__cplusplus
219 }
220 #endif
221 
222 #endif	/* _AUDIT_PRIVATE_H */
223