xref: /titanic_44/usr/src/lib/libbsm/common/audit_private.h (revision 6a3b10db10504576d94f22ea0d7aaf12b96b0bbe)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
52d84dfe8Sgww  * Common Development and Distribution License (the "License").
62d84dfe8Sgww  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22*6a3b10dbStz204579  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  *
257c478bd9Sstevel@tonic-gate  * Do not add to this file unless it is to cover an existing private
267c478bd9Sstevel@tonic-gate  * interface and do not write new code that depends on this header
277c478bd9Sstevel@tonic-gate  * file or the interfaces contained in it.
287c478bd9Sstevel@tonic-gate  *
297c478bd9Sstevel@tonic-gate  * This is a private interface, subject to change.  It exists solely
307c478bd9Sstevel@tonic-gate  * as a way of making certain existing clients of libbsm lint clean.
317c478bd9Sstevel@tonic-gate  * As the related interfaces are replaced with the adt.* interfaces,
327c478bd9Sstevel@tonic-gate  * this header should shrink to zero.
337c478bd9Sstevel@tonic-gate  */
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate #ifndef _AUDIT_PRIVATE_H
367c478bd9Sstevel@tonic-gate #define	_AUDIT_PRIVATE_H
377c478bd9Sstevel@tonic-gate 
387c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
397c478bd9Sstevel@tonic-gate 
407c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
417c478bd9Sstevel@tonic-gate extern "C" {
427c478bd9Sstevel@tonic-gate #endif
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate #include <bsm/libbsm.h>
457c478bd9Sstevel@tonic-gate #include <pwd.h>
467c478bd9Sstevel@tonic-gate 
477c478bd9Sstevel@tonic-gate /*
487c478bd9Sstevel@tonic-gate  * audit_settid.c
497c478bd9Sstevel@tonic-gate  * interface users
507c478bd9Sstevel@tonic-gate  * rexecd
517c478bd9Sstevel@tonic-gate  * rlogind
527c478bd9Sstevel@tonic-gate  * rshd
537c478bd9Sstevel@tonic-gate  * telnetd
547c478bd9Sstevel@tonic-gate  * rexd
557c478bd9Sstevel@tonic-gate  */
567c478bd9Sstevel@tonic-gate extern	int	audit_settid(int);
577c478bd9Sstevel@tonic-gate 
587c478bd9Sstevel@tonic-gate /*
597c478bd9Sstevel@tonic-gate  * audit_allocate.c
607c478bd9Sstevel@tonic-gate  * interface user
617c478bd9Sstevel@tonic-gate  * allocate
627c478bd9Sstevel@tonic-gate  */
637c478bd9Sstevel@tonic-gate extern	void	audit_allocate_argv(int, int, char *[]);
647c478bd9Sstevel@tonic-gate extern	int	audit_allocate_record(int);
657c478bd9Sstevel@tonic-gate extern	void	audit_allocate_list(char *);
667c478bd9Sstevel@tonic-gate extern	void	audit_allocate_device(char *);
677c478bd9Sstevel@tonic-gate 
687c478bd9Sstevel@tonic-gate /*
697c478bd9Sstevel@tonic-gate  * audit_ftpd.c
707c478bd9Sstevel@tonic-gate  * interface user
717c478bd9Sstevel@tonic-gate  * ftpd
727c478bd9Sstevel@tonic-gate  */
737c478bd9Sstevel@tonic-gate extern	void	audit_ftpd_bad_pw(char *uname);
747c478bd9Sstevel@tonic-gate extern	void	audit_ftpd_excluded(char *uname);
757c478bd9Sstevel@tonic-gate extern	void	audit_ftpd_failure(char *uname);
767c478bd9Sstevel@tonic-gate extern	void	audit_ftpd_no_anon(void);
777c478bd9Sstevel@tonic-gate extern	void	audit_ftpd_success(char *uname);
787c478bd9Sstevel@tonic-gate extern	void	audit_ftpd_unknown(char *uname);
797c478bd9Sstevel@tonic-gate extern	void	audit_ftpd_logout(void);
807c478bd9Sstevel@tonic-gate 
817c478bd9Sstevel@tonic-gate /*
827c478bd9Sstevel@tonic-gate  * audit_rexecd.c
837c478bd9Sstevel@tonic-gate  * interface user
847c478bd9Sstevel@tonic-gate  * rexecd
857c478bd9Sstevel@tonic-gate  */
867c478bd9Sstevel@tonic-gate extern	void	audit_rexecd_setup(void);
877c478bd9Sstevel@tonic-gate extern	void	audit_rexecd_success(char *, char *, char *);
887c478bd9Sstevel@tonic-gate extern	void	audit_rexecd_fail(char *, char *, char *, char *);
897c478bd9Sstevel@tonic-gate 
907c478bd9Sstevel@tonic-gate /*
917c478bd9Sstevel@tonic-gate  * audit_rshd.c
927c478bd9Sstevel@tonic-gate  * interface user
937c478bd9Sstevel@tonic-gate  * rshd
947c478bd9Sstevel@tonic-gate  */
957c478bd9Sstevel@tonic-gate extern	int	audit_rshd_setup(void);
967c478bd9Sstevel@tonic-gate extern	int	audit_rshd_success(char *, char *, char *, char *);
977c478bd9Sstevel@tonic-gate extern	int	audit_rshd_fail(char *, char *, char *, char *, char *);
987c478bd9Sstevel@tonic-gate 
997c478bd9Sstevel@tonic-gate /*
1007c478bd9Sstevel@tonic-gate  * audit_at.c
1017c478bd9Sstevel@tonic-gate  * interface users
1027c478bd9Sstevel@tonic-gate  * atrm
1037c478bd9Sstevel@tonic-gate  * at
1047c478bd9Sstevel@tonic-gate  */
1057c478bd9Sstevel@tonic-gate extern	int	audit_at_delete(char *, char *, int);
1067c478bd9Sstevel@tonic-gate extern	int	audit_at_create(char *, int);
1077c478bd9Sstevel@tonic-gate 
1087c478bd9Sstevel@tonic-gate /*
1097c478bd9Sstevel@tonic-gate  * audit_crontab.c
1107c478bd9Sstevel@tonic-gate  * interface user
1117c478bd9Sstevel@tonic-gate  * crontab
1127c478bd9Sstevel@tonic-gate  */
1137c478bd9Sstevel@tonic-gate extern	int	audit_crontab_modify(char *, char *, int);
1147c478bd9Sstevel@tonic-gate extern	int	audit_crontab_delete(char *, int);
1157c478bd9Sstevel@tonic-gate extern	int	audit_crontab_not_allowed(uid_t, char *);
1167c478bd9Sstevel@tonic-gate extern	int	audit_crontab_process_not_audited(void);
1177c478bd9Sstevel@tonic-gate 
1187c478bd9Sstevel@tonic-gate /*
1197c478bd9Sstevel@tonic-gate  * audit_cron.c
1207c478bd9Sstevel@tonic-gate  * interface users
1217c478bd9Sstevel@tonic-gate  * cron
1227c478bd9Sstevel@tonic-gate  * at
1237c478bd9Sstevel@tonic-gate  */
1247c478bd9Sstevel@tonic-gate extern	int	audit_cron_session(char *, char *, uid_t, gid_t, char *);
1257c478bd9Sstevel@tonic-gate extern	void	audit_cron_new_job(char *, int, void *);
1267c478bd9Sstevel@tonic-gate extern	void	audit_cron_bad_user(char *);
1277c478bd9Sstevel@tonic-gate extern	void	audit_cron_user_acct_expired(char *);
1287c478bd9Sstevel@tonic-gate extern	int	audit_cron_create_anc_file(char *, char *, char *, uid_t);
1297c478bd9Sstevel@tonic-gate extern	int	audit_cron_delete_anc_file(char *, char *);
1307c478bd9Sstevel@tonic-gate extern	int	audit_cron_is_anc_name(char *);
1317c478bd9Sstevel@tonic-gate extern	int	audit_cron_mode(void);
1327c478bd9Sstevel@tonic-gate extern	char	*audit_cron_make_anc_name(char *);
1337c478bd9Sstevel@tonic-gate extern	int	audit_cron_setinfo(char *, auditinfo_addr_t *);
1347c478bd9Sstevel@tonic-gate 
1357c478bd9Sstevel@tonic-gate /*
1367c478bd9Sstevel@tonic-gate  * audit_mountd.c
1377c478bd9Sstevel@tonic-gate  * interface user
1387c478bd9Sstevel@tonic-gate  * mountd
1397c478bd9Sstevel@tonic-gate  */
1407c478bd9Sstevel@tonic-gate extern	void	audit_mountd_setup(void);
1417c478bd9Sstevel@tonic-gate extern	void	audit_mountd_mount(char *, char *, int);
1427c478bd9Sstevel@tonic-gate extern	void	audit_mountd_umount(char *, char *);
1437c478bd9Sstevel@tonic-gate 
1447c478bd9Sstevel@tonic-gate /*
1457c478bd9Sstevel@tonic-gate  * audit_halt.c
1467c478bd9Sstevel@tonic-gate  * interface user
1477c478bd9Sstevel@tonic-gate  * halt
1487c478bd9Sstevel@tonic-gate  */
1497c478bd9Sstevel@tonic-gate extern	int	audit_halt_setup(int, char **);
1507c478bd9Sstevel@tonic-gate extern	int	audit_halt_success(void);
1517c478bd9Sstevel@tonic-gate extern	int	audit_halt_fail(void);
1527c478bd9Sstevel@tonic-gate 
1537c478bd9Sstevel@tonic-gate /*
1547c478bd9Sstevel@tonic-gate  * audit_shutdown.c
1557c478bd9Sstevel@tonic-gate  * interface user
1567c478bd9Sstevel@tonic-gate  * shutdown
1577c478bd9Sstevel@tonic-gate  */
1587c478bd9Sstevel@tonic-gate extern	int	audit_shutdown_setup(int, char **);
1597c478bd9Sstevel@tonic-gate extern	int	audit_shutdown_success(void);
1607c478bd9Sstevel@tonic-gate extern	int	audit_shutdown_fail(void);
1617c478bd9Sstevel@tonic-gate 
1627c478bd9Sstevel@tonic-gate /*
1637c478bd9Sstevel@tonic-gate  * audit_reboot.c
1647c478bd9Sstevel@tonic-gate  * interface user
1657c478bd9Sstevel@tonic-gate  * halt
1667c478bd9Sstevel@tonic-gate  */
1677c478bd9Sstevel@tonic-gate extern	int	audit_reboot_setup(void);
1687c478bd9Sstevel@tonic-gate extern	int	audit_reboot_success(void);
1697c478bd9Sstevel@tonic-gate extern	int	audit_reboot_fail(void);
1707c478bd9Sstevel@tonic-gate 
1717c478bd9Sstevel@tonic-gate /*
1727c478bd9Sstevel@tonic-gate  * audit_rexd.c
1737c478bd9Sstevel@tonic-gate  * interface users
1747c478bd9Sstevel@tonic-gate  * rpc.rexd
1757c478bd9Sstevel@tonic-gate  */
1767c478bd9Sstevel@tonic-gate extern	void 	audit_rexd_fail(char *, char *, char *, uid_t, gid_t,
1777c478bd9Sstevel@tonic-gate     char *, char **);
1787c478bd9Sstevel@tonic-gate extern	void	audit_rexd_success(char *, char *, uid_t, gid_t,
1797c478bd9Sstevel@tonic-gate     char *, char **);
1807c478bd9Sstevel@tonic-gate extern	void	audit_rexd_setup(void);
1817c478bd9Sstevel@tonic-gate 
1827c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
1837c478bd9Sstevel@tonic-gate }
1847c478bd9Sstevel@tonic-gate #endif
1857c478bd9Sstevel@tonic-gate 
1867c478bd9Sstevel@tonic-gate #endif	/* _AUDIT_PRIVATE_H */
187