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.
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.
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]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #include <sys/syscall.h>
27 #include <sys/types.h>
28 #include <bsm/audit.h>
29 #include <sys/socket.h>
30 #include <sys/param.h>
32 const char *bsm_dom
= TEXT_DOMAIN
;
37 return (syscall(SYS_auditsys
, BSM_AUDITDOOR
, fd
));
42 audit(char *record
, int length
)
44 return (syscall(SYS_auditsys
, BSM_AUDIT
, record
, length
));
49 getauid(au_id_t
*auid
)
51 return (syscall(SYS_auditsys
, BSM_GETAUID
, auid
));
56 setauid(au_id_t
*auid
)
58 return (syscall(SYS_auditsys
, BSM_SETAUID
, auid
));
63 getaudit(auditinfo_t
*ai
)
65 return (syscall(SYS_auditsys
, BSM_GETAUDIT
, ai
));
69 getaudit_addr(auditinfo_addr_t
*ai
, int len
)
71 return (syscall(SYS_auditsys
, BSM_GETAUDIT_ADDR
, ai
, len
));
76 setaudit(auditinfo_t
*ai
)
78 return (syscall(SYS_auditsys
, BSM_SETAUDIT
, ai
));
83 setaudit_addr(auditinfo_addr_t
*ai
, int len
)
85 return (syscall(SYS_auditsys
, BSM_SETAUDIT_ADDR
, ai
, len
));
90 auditon(int cmd
, caddr_t data
, int length
)
92 return (syscall(SYS_auditsys
, BSM_AUDITCTL
, cmd
, data
, length
));